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:
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.
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.
How long does the task take to complete? If it could a long time (relative to your application's needs), it's probably better to run as a thread. You can use osThreadFlagsWait() to block on signals with an arbitrary timeout (in RTOS ticks).
Sorry for the late reply. It doesn't take long. It should just check if the devices on the serial ports are still connected. It is also not time critical. I am now using the Virtual Timer and it works. I will keep your suggestion in mind though.
View all questions in Keil forum