mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-25 23:38:06 +00:00
enable_irq since uno bootloader can disable it. systick triggered, however usb still not work with uno
This commit is contained in:
parent
feb58ebd54
commit
0d9973ef87
@ -92,6 +92,10 @@ const bsp_interrupt_event_t g_interrupt_event_link_select[BSP_ICU_VECTOR_MAX_ENT
|
|||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
|
|
||||||
void board_init(void) {
|
void board_init(void) {
|
||||||
|
// Enable global interrupts in CPSR register since board with bootloader such as Arduino Uno R4
|
||||||
|
// can transfer CPU control with CPSR.I bit set to 0 (disable IRQ)
|
||||||
|
__enable_irq();
|
||||||
|
|
||||||
/* Configure pins. */
|
/* Configure pins. */
|
||||||
R_IOPORT_Open(&port_ctrl, &family_pin_cfg);
|
R_IOPORT_Open(&port_ctrl, &family_pin_cfg);
|
||||||
|
|
||||||
|
@ -740,6 +740,7 @@ void dcd_init(uint8_t rhport)
|
|||||||
rusb->BEMPENB = 1;
|
rusb->BEMPENB = 1;
|
||||||
rusb->BRDYENB = 1;
|
rusb->BRDYENB = 1;
|
||||||
|
|
||||||
|
// If VBUS (detect) pin is not used, application need to call tud_connect() manually after tud_init()
|
||||||
if (rusb->INTSTS0_b.VBSTS) {
|
if (rusb->INTSTS0_b.VBSTS) {
|
||||||
dcd_connect(rhport);
|
dcd_connect(rhport);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user