mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
32 lines
1.4 KiB
INI
32 lines
1.4 KiB
INI
/*-------------------------------------------------------------------
|
|
** 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();
|
|
}
|