My microcontroller has one flash controller, so each flash erase/write cycle is causing system freeze for some time (e.g. 15ms). It has negative influence on time counting by freeRtos because systick is blocked and ticks are not counting up. I would like to measure erase/write time and provide correction to rtosSystem. Similar actions are made when feature configUSE_TICKLESS_IDLE is enabled. I need you guidance to do it in right way.
- measure erase/cycle time in system ticks via independent HW timer
- call xTaskCatchUpTicks() to increase xTickCount.
Do I need to do something more? Do I need to use critical section when calling xTaskCatchUpTicks()?