This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Which timer is the best choice for RTX RTOS?

I have found a variety of timers and wonder which one I should use for my RTOS application. I should run a non-timing-critical task periodically. I found the GPIO timers on the Cortex M3 as well as the SysTick timers. Then there is also a virtual timer that is offered by the RTOS itself and described under Timer Management.

My assumptions are:

  • GPIO Timers are best for timing critical applications but can't be configured via CMSIS
  • SysTick is a standardized timer from ARM, which is the same on all Cortex-M processors and thus easily configurable via CMSIS. It works with ticks and thus the best choice for an RTOS
  • Virtual timers are thread-based and probably waste the most processor resources, because they are not hardware-based but provided by the RTOS.

Then there is also the question about the interrupt. The ISR should just check connections every few seconds. There are NVIC Interrupts and I could just define a function in the SysTick handler. My application already uses a UART callback interrupt that should definitely have the highest priority. 

Parents
  • So I basically answered a few of the functions myself. Since I am using the RTX Kernel the SysTick Timer is used by the Virtual Timer of the RTOS. I can't define SysTick_Handler, because it is already defined in irq_cm3.s. I think for simple non-timing-critical task this Timer is a better choice than the GPIO Timers. I also don't need NVIC Interrupts for this, because from what I have understood they are mostly for triggering interrupts by periphals, which I don't need.

Reply
  • So I basically answered a few of the functions myself. Since I am using the RTX Kernel the SysTick Timer is used by the Virtual Timer of the RTOS. I can't define SysTick_Handler, because it is already defined in irq_cm3.s. I think for simple non-timing-critical task this Timer is a better choice than the GPIO Timers. I also don't need NVIC Interrupts for this, because from what I have understood they are mostly for triggering interrupts by periphals, which I don't need.

Children