Today, the timers module was updated with some important features.
First, timer can be unregistered or rescheduled in a timeout handler which can be a different timer's handler from the one to be unreigstered or rescheduled.
Second, TIMER_IRQ/TIMER_BH types are added so that the timeout handler can be executed in IRQ context or BH context.
Third, timer is no longer sharing the handler with the BH, so that, global BH entries could be reduced to save memory.
In the recent time, a new revision will be published due to this important updates.
What's the interrupted timer and how could this be used?
There are tow kinds of firmware architecture implemented in the sdfirm:
1. IRQ polling
2. IRQ interrupting
In IRQ polling mode, CPU could never run into idle mode (thus no low power consumption) since there are always pollers busy running in the BH context. Note that peripheral IRQs would be disabled in such architecture as IRQs could be noticed by the pollers. Thus the entire system can run without global IRQ disabling. The interrupted timer then can be the only IRQ existing in the system to achieve high resolution realtime capability for such low speed embedded CPUs.