Merge branch 'master' of github.com:microbuilder/tinyusb

Conflicts:
	demos/host/host_os_none/host_os_none.uvopt
This commit is contained in:
hathach 2013-09-12 14:44:02 +07:00
commit 968c218f33
4 changed files with 42 additions and 2 deletions

View File

@ -69,7 +69,15 @@ void board_init(void)
scu_pinmux(0x7, 5, MD_PDN, 0x5); /* P7_5 = TRACEDATA[1] */
scu_pinmux(0x7, 6, MD_PDN, 0x5); /* P7_6 = TRACEDATA[2] */
scu_pinmux(0x7, 7, MD_PDN, 0x5); /* P7_7 = TRACEDATA[3] */
// USB0 Power: EA4357 channel B U20 GPIO26 active low (base board), P2_3 on LPC4357
scu_pinmux(0x2, 3, MD_PUP | MD_EZI, FUNC7); // USB0 VBus Power
// 1.5Kohm pull-up resistor is needed on the USB DP data signal. GPIO28 (base), P9_5 (LPC4357) controls
//scu_pinmux(0x9, 5, MD_PUP|MD_EZI|MD_ZI, FUNC4); // GPIO5[18]
//GPIO_SetDir(5, BIT_(18), 1); // output
//GPIO_ClearValue(5, BIT_(18));
/* Init I2C @ 400kHz */
I2C_Init(LPC_I2C0, 400000);
I2C_Cmd(LPC_I2C0, ENABLE);

View File

@ -63,7 +63,8 @@
#include "lpc43xx_uart.h"
#include "lpc43xx_i2c.h"
#define CFG_PRINTF_TARGET PRINTF_TARGET_UART
#define CFG_PRINTF_TARGET PRINTF_TARGET_SWO
//#define CFG_PRINTF_TARGET PRINTF_TARGET_UART
#ifdef __cplusplus
}

View File

@ -0,0 +1,31 @@
/*-------------------------------------------------------------------
** Define the function to enable the trace port
**-----------------------------------------------------------------*/
FUNC void EnableTPIU(void) {
/* Configure TRACE pins for MCB4357 */
//_WDWORD(0x40086790, 0x000000B2); // LPC_SCU->SFSPF_4 = 2;
//_WDWORD(0x40086794, 0x000000B3); // LPC_SCU->SFSPF_5 = 3;
//_WDWORD(0x40086798, 0x000000B3); // LPC_SCU->SFSPF_6 = 3;
//_WDWORD(0x4008679C, 0x000000B3); // LPC_SCU->SFSPF_7 = 3;
//_WDWORD(0x400867A0, 0x000000B3); // LPC_SCU->SFSPF_8 = 3;
/* Configure TRACE pins for LPC4357USB */
_WDWORD(0x40086790, 0x000000B2); // LPC_SCU->SFSPF_4 = 2 - TRACECLK
_WDWORD(0x40086390, 0x000000B5); // LPC_SCU->SFSP7_4 = 5 - TRACEDATA[0]
_WDWORD(0x40086394, 0x000000B5); // LPC_SCU->SFSP7_5 = 5 - TRACEDATA[1]
_WDWORD(0x40086398, 0x000000B5); // LPC_SCU->SFSP7_6 = 5 - TRACEDATA[2]
_WDWORD(0x4008639C, 0x000000B5); // LPC_SCU->SFSP7_7 = 5 - TRACEDATA[3]
}
/*-------------------------------------------------------------------
** Invoke the function at debugger startup
**-----------------------------------------------------------------*/
EnableTPIU();
/*-------------------------------------------------------------------
** Execute upon software RESET
**-----------------------------------------------------------------*/
FUNC void OnResetExec(void) {
EnableTPIU();
}

View File

@ -746,7 +746,7 @@
<CpuDllArguments></CpuDllArguments>
<PeripheralDll></PeripheralDll>
<PeripheralDllArguments></PeripheralDllArguments>
<InitializationFile></InitializationFile>
<InitializationFile>..\..\bsp\boards\microbuilder\board_lpc4357usb_etminit.ini</InitializationFile>
<Driver>Segger\JL2CM3.dll</Driver>
</TargetDlls>
</DebugOption>