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.
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.