Can you please provide an example of how to code ISRs in ASM on ESP32-C3? There are examples for normal ESP32, but none for C3.
We need to process an interrupt in close to hard real-time. Receive interrupt on NMI every 18.66ms. Program PWM to generate delayed pulse from 0-18ms. Then return from ISR. Delay can be controlled by global variable.
The idea is to be as fast a possible with programming the PWM in the NMI ISR. Can this be made fast enough to not interfere with Wifi/BLE? Can this be chained onto the watchdog ISR?
No desire to write this in C or drop down into FreeRTOS. Only want to program the PWM hardware and return.
ASM example for ESP32-C3 ISR
Re: ASM example for ESP32-C3 ISR
ESP32C3 is based on the RISC-V architecture, therefore, the way of how interrupts are processed in the ASM vector table is different than the way for ESP32 (Xtensa architecture). Basically, ESP32C3 allows for high-level interrupt handlers being coded in C, and there is no much time-benefit from writing the ISR (even NMI level interrupt) in ASM than writing in C for ESP32C3 chips. An NMI level interrupt only ensures it wouldn't be blocked by any critical sections, so you can still expect up to 2us for the interrupt overhead before getting to the ISR code, and up to 5us for interrupt delay if there happens a context switch (with WIFI/BLE).
Who is online
Users browsing this forum: mensbufo and 67 guests