Skip to content

Commit 0d9973e

Browse files
committed
enable_irq since uno bootloader can disable it. systick triggered, however usb still not work with uno
1 parent feb58eb commit 0d9973e

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

hw/bsp/ra/family.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ const bsp_interrupt_event_t g_interrupt_event_link_select[BSP_ICU_VECTOR_MAX_ENT
9292
//--------------------------------------------------------------------+
9393

9494
void board_init(void) {
95+
// Enable global interrupts in CPSR register since board with bootloader such as Arduino Uno R4
96+
// can transfer CPU control with CPSR.I bit set to 0 (disable IRQ)
97+
__enable_irq();
98+
9599
/* Configure pins. */
96100
R_IOPORT_Open(&port_ctrl, &family_pin_cfg);
97101

src/portable/renesas/rusb2/dcd_rusb2.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,7 @@ void dcd_init(uint8_t rhport)
740740
rusb->BEMPENB = 1;
741741
rusb->BRDYENB = 1;
742742

743+
// If VBUS (detect) pin is not used, application need to call tud_connect() manually after tud_init()
743744
if (rusb->INTSTS0_b.VBSTS) {
744745
dcd_connect(rhport);
745746
}

0 commit comments

Comments
 (0)