STM32 FreeRTOS Statistics
Jump to navigation
Jump to search
When developing applications which use FreeRTOS it can be quite unclear how much processing time is actually being used by each task. Fortunately, FreeRTOS have the option of enabling task statistics.
I was at some point messing around with DMA driven PWM (see here).
First step is to enable a timer. The clock configuration is like this:
In other words, the APB1 Timer Clock is running at 96 MHz. Configuring the timer with a counter period of 959 and no prescaler will result in an interrupt frequency of 100 kHz - or 100 interrupts every millisecond.
The final step is to enable the statistics in the FreeRTOS section of CubeMX: