Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

cpu/esp32: fix stdio_usb_serial_jtag for ESP32-C3 #19415

Merged
merged 1 commit into from
Mar 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions cpu/esp32/stdio_usb_serial_jtag/usb_serial_jtag.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,16 @@ void stdio_init(void)
/* clear all interrupt flags */
usb_serial_jtag_ll_clr_intsts_mask(USB_SERIAL_JTAG_LL_INTR_MASK);

/* route all UART interrupt sources to same the CPU interrupt */
/* route USB Serial/JTAG interrupt source to CPU interrupt */
intr_matrix_set(PRO_CPU_NUM, ETS_USB_SERIAL_JTAG_INTR_SOURCE, CPU_INUM_SERIAL_JTAG);

/* we have to enable therefore the CPU interrupt here */
/* enable the CPU interrupt */
intr_cntrl_ll_set_int_handler(CPU_INUM_SERIAL_JTAG, _serial_intr_handler, NULL);
intr_cntrl_ll_enable_interrupts(BIT(CPU_INUM_SERIAL_JTAG));

#ifdef SOC_CPU_HAS_FLEXIBLE_INTC
/* set interrupt level */
intr_cntrl_ll_set_int_level(CPU_INUM_SERIAL_JTAG, 1);
#endif
}
/**@}*/