Showing changes from revision #3 to #4:
Added | Removed | Changed
void HAL_TimerIRQClear(int32_t timer)
Entry | |
---|---|
timer | Timer number |
Exit | |
---|---|
- |
This entry was originally added to support a platform where there were multiple timers, all multiplexed through the same interrupt in the main interrupt controller.
On such platforms, it does not make sense to latch the shared timer interrupt in the main interrupt controller. Instead, individual timers are cleared by the use of a dedicated timer clear register in the timer peripheral.
This entry is actually more widely applicable than its sibling, HAL_TimerIRQStatus, because there are other platforms where the timer latch is cleared in a separate timer peripheral, even though each timer has its own interrupt in the main interrupt controller. The use of a separate HAL_TimerIRQClear entry in these cases is desirable because it removes complexity from the HAL_IRQClear entry and so enables other interrupt handlers to run a little faster.
For compatibility with platforms where timer latching is a function of the main interrupt controller, if you are writing a timer interrupt handler, you must call both HAL_TimerIRQClear and then HAL_IRQClear.