2022-06-23 08:37 PM
Hi,
I have enabled the interrupts for channel set (SETx1) and channel reset (RSTx1) by setting bits RSTx1IE and SET1xIE. I am trying to drive the outputs to active-inactive state via software by writing to SST and RST bits of the TIMERA.
Inside the TIMAISR register I can see the SETx1 and RSTx1 interrupt event flags are set. This indicates the fact that output active-inactive state changes are driving the interrupts.
But I cannot see the respective ISR HRTIM1_TIMA_IRQHandler getting hit. While other interrupts are working fine and I can see the ISR gets executed in those situations, it is only for the SETx1 and RSTx1/SETx2 and RSTx2 I see this problem.
Is there any settings I could me missing that might cause this issue?
Solved! Go to Solution.
2022-07-12 01:25 AM
Hi,
No, I meant that having RSTxIE and SETxIE set is not enough. The DIER register is duplicated , with a preload register (written by the CPU) and an active register (which actually controls the interrupt enable signal). To have the interrupt enabled, the content of the DIER_Preload must be transferred into the DIER_Active. There are multiple means to do this transfer (so called update), usually on counter roll-over. For a quick trial, you can force this update by software writing the TASWU bit in the HRTIM_CR2 register.
Best regards,
Vincent
2022-07-08 06:15 AM
Hi,
Was the HRTIM_TIMADIER register updated after you've set the RSTxIE and SETxIE bits? This could explain the situation (interrupt enable bit set in preload register but not transferred into the active register). You can force an update without starting the timer with the TASWU bit in the HRTIM_CR2 register.
2022-07-12 12:28 AM
Hi Vincent,
You mean to say the below bits?
They are indeed set.
Also, please note the below flags are set that tell interrupt occurred:
2022-07-12 01:25 AM
Hi,
No, I meant that having RSTxIE and SETxIE set is not enough. The DIER register is duplicated , with a preload register (written by the CPU) and an active register (which actually controls the interrupt enable signal). To have the interrupt enabled, the content of the DIER_Preload must be transferred into the DIER_Active. There are multiple means to do this transfer (so called update), usually on counter roll-over. For a quick trial, you can force this update by software writing the TASWU bit in the HRTIM_CR2 register.
Best regards,
Vincent
2022-07-12 10:22 PM
Yes! This works.. Either I can configure the preload settings in the CubeMX to write to active register directly and it works, or if preload settings are set to write to preload register, then an update event does the job.