I am trying to construct bare metal programs for ESP32C3. I setup interrupt routines as guided in RISCV documents. All registers (mtvec, mstatus interrupt enable, ...) are setup. I also use the ROM-based function intr_matrix_set to map interrupts from sources to CPU interrupts. However, when I tried to raise a CPU interrupt by setting the register SYSTEM_CPU_INTR_FROM_CPU_0_REG. The register INTERRUPT_CORE0_INTR_STATUS_0_REG reflected that the interrupt appeared. However the interrupt routine is not called.
When I used the asm instruction "ecall", the exception was raised and the exception handler is called as expected.
Is there anybody successfully using interrupts in bare metal programs? Could you please give me some hint to debug that.
Thank you in advance.
Minh
PS: Attached is my code
ESP32C3 - Bare metal - Can not use interrupt
ESP32C3 - Bare metal - Can not use interrupt
- Attachments
-
- vector_table.h
- (5.05 KiB) Downloaded 257 times
-
- vector_table.c
- (8.47 KiB) Downloaded 242 times
-
- main.c
- (5.42 KiB) Downloaded 278 times
Re: ESP32C3 - Bare metal - Can not use interrupt
Did you managed to fix it?
I am also trying to use interrupt (USB JTAG UART RX) on the ESP32-C3, also unsuccessful.
I am also trying to use interrupt (USB JTAG UART RX) on the ESP32-C3, also unsuccessful.
Re: ESP32C3 - Bare metal - Can not use interrupt
No, I have to give up and change to Blue pill.
Who is online
Users browsing this forum: pmi2410 and 183 guests