High-rate timer callouts
2012-01-09 00:07:53 GMT
I have a collection of sensors that I need to poll fairly quickly (~1kHz). Traditionally, I'd just dedicate a timer and poll from the timer interrupt handler, or set the scheduling quantum to 1ms and use a high-priority thread to poll at every tick.
I'm curious as to whether some of the other NuttX primitives could be used to do this in a more canonical fashion. For example, the work_queue() interface looks interesting, but designed for longer-running workers that can be blocked, pre-empted, etc, and competition for the worker thread could easily lead to sensor data being lost.
Right now, since I'm running on STM32 it looks like the best approach is to extend the stm32_tim driver to support output compare interrupts on a timer, which I'm sure will work but is of course quite a platform-dependent solution.