xmc4500 ported, cdc msc example run fine

This commit is contained in:
hathach
2021-11-05 13:13:21 +07:00
parent d9cf49cbfd
commit d87a897a7b
5 changed files with 161 additions and 1 deletions
+13
View File
@@ -30,6 +30,15 @@
#include "bsp/board.h"
#include "board.h"
//--------------------------------------------------------------------+
// Forward USB interrupt events to TinyUSB IRQ Handler
//--------------------------------------------------------------------+
void USB0_0_IRQHandler(void)
{
tud_int_handler(0);
}
void board_init(void)
{
board_clock_init();
@@ -58,6 +67,10 @@ void board_init(void)
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
NVIC_SetPriority(USB0_0_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY );
#endif
// USB Power Enable
XMC_SCU_RESET_DeassertPeripheralReset(XMC_SCU_PERIPHERAL_RESET_USB0);
XMC_SCU_POWER_EnableUsb();
}
//--------------------------------------------------------------------+