Now I would also like to use a timer IRQ without this wrapper. How can I implement this?
If I handle the Interupt service routine without a wrapper, i.e. directly call r_rspi0_transmit_interrupt, then I get stuck somewhere and my WatchDog task is no longer called.
I need an 8µs raster cyclically every millisecond for a duration of 168µs. With the wrapper, the jitter is too high for my application. I would therefore like to use the timer IRQ without wrapper and the others with wrapper.
The define “configMAX_API_CALL_INTERRUPT_PRIORITY” does not exist in this version.
I have tested with the highest and lowest IRQ priority of the timer without success.
Regardless of this, my timer IRQ must be highly prioritized so that the jitter is minimal and the timing is predictable.
Thank you for sharing this info. All this interrupt handler does it store the used registers before calling the application interrupt handler. Are you saving the registers that are used in the ISR? Are you writing it in C or assembly?
The wrapper is written in assembly and saves and restores the registers.
My timer IRQ is written in C and does not handle the registers.
Do I also have to take care of the registers in the timer IRQ (C code)?
If so, do you have an example C code for me?
yes, of course. Any interrupt must be completly transparent to the interrupted thread of execution, so all registers that are being manipulated by the ISR must be properly saved and restored.
Doing this in C normally requires saving/restoring ALL registers as there is no prediction what registers are being used in the ISR due to optimization.
The No_GIC port does not support partial masking of interrupts, so this is the expected behavior.
You might see if you can alter to port to handle that ability (assuming the processor has an interrupt controller that would support it). The Cortex-M were nice in that they all supported the same interrupt controller (at least close enough), the bigger R family doesn’t, so the “generic” ports aren’t as functional, but need versions for each type of controller.
It looks like the Renesas EC-1 interrupt controller does support Richard’s suggestion. The VIC’s PRLM register lets you mask interrupts by priority level, and the PRLC register lets you unmask them again.