what is the most accurate way in FreeRTOS to convert tick counts to milliseconds?
hey guys, I'm working on an embedded system running FreeRTOS on an ARM Cortex-M4 microcontroller clocked at 72MHz. I need to measure the execution time of a specific code block to optimize performance. The code snippet using provides tick counts, but I need the time in milliseconds for better analysis. Considering the clock speed, what is the most accurate way in FreeRTOS to convert tick counts to milliseconds and achieve millisecond-level resolution for measuring code execution time? @Middleware & OS
Solution
so you have 72M ticks per a second. Ok your task takes from tickX to tickY. So taskTicks is tickY - tickX. from there is just some sums to ms?