We use the S32K in S32DS,and add the Freertos components.
After I added Freertos, the program worked. I used absolute time delay, but the execution time of the periodic task is not correct. For example, 100ms, the deviation will be 102 ms, how can this be calibrated?
vTaskDelayUntil is a delay function.
Hello zhangzhiyong@zlgmcu.com,
I'm not sure what the wave form actually means, you mentioned 100ms delay, then 5ms and you showed a 3s pulse.
How exactly do you measure the delay? Can you share a simple test project so that I can reproduce it on my side?
The clock source of the SysTick might not be precise, for example, FIRC is specified with 0.5% typ. frequency deviation.
S32K1xx DS, rev 13, Table 29. Fast internal RC Oscillator electrical specifications for S32K1xx series.
The xTaskGetTickCount() function can read the xTickCount counter just before or after it is incremented.
So it can't be exactly precise. And I assume in you project it increments every 1ms.
Regards,
Daniel