Hi,
I'm new to RZ/T1 but have experience with SH2A CPUs. I'm currently struggling with some issues with nested and reentrant interrupts. Can I somehow set the priority of the current interrupt to a lower one, so that this interrupt can create further nested interrupts, that can be interrupted by the main interrupt?
Imagine we have two real interrupts: ISR_10 (CMT0 100 µs, prio 2) that creates another subtask ISR_11 every 200 µs and ISR_20 (CMT1 1 ms, prio 6) which creates another subtask ISR_21 every 10 ms. The main interrupts (ISR_10 / _20) should be able to interrupt the subtasks they created. ISR_10 should be able to interrupt ISR_20 / _21. ISR_20 should NOT be able to interrupt ISR_10 /_11.
Normally, when the main task (e.g. ISR_10) branches into the subtask (e.g. ISR_11) the IRQ priority will be set to a lower prio, so that the main task ISR_10 can interrupt the subtask ISR_11. How is this done with the RZ/T1? On the SH2A you just call set_imask().
Here we have the HVA0 register, that has to be written at the end of the ISR to notify the interrupt processing completion and clear the priority level of the stored interrupt. In my case, I have to set the HVA0 register at the end of ISR_10, so that the running ISR_11 can be interrupted by ISR_10. If I set the HVA0 at the end of ISR_11, the ISR_10 cannot interrupt itself because of the same priority level. The same for ISR_20. Setting the HVA0 register at the end of ISR_10 / ISR_20 allows the ISR_20 to interrupt ISR_11, what shouldn't happen. ISR_11 should be running with a priority level (3) less than ISR_10 and higher ISR_20. Can I achieve this with RZ/T1?