hello
S32DS software has the delay function.the example project that s32ds provide is millisecond(ms) delay "OSIF_TimeDelay(1)", now I want to use microsecond(us) delay ,how l acquire this function ,please help me if you know how to configuration register or give me example project. thank you.
解決済! 解決策の投稿を見る。
Hello,
The OSIF implementation can be found in the osif_baremetal.c file.
The reload value of the SysTick is the core frequency divided by 1000, that means that the Systick interrupt is called every 1ms and increment the s_osif_tick_cnt counter.
The counter is then read and compered by the OSIF_TimeDelay() function.
If the core frequency was divided by 10000, the counter would increment every 100us (OSIF_TimeDelay(1) = 100us).
The SysTick description can be found in ARM documentation.
Cortex™-M4 Devices Generic User Guide
Section 4.4 System timer, SysTick
Regards,
Daniel
Hi Daniel,
I also have the same requirement to generate microsecond delay, but my Controllers is MPC5777C. OSIF is connected to PIT(default) and its frequency is 100MHz. I have also followed your instructions and updated divider value in "static inline void osif_UpdateTickConfig(void)" function, as shown in image below.
The problem is when I call "OSIF_TimeDelay(1)" program pointer is struck in "osif_Tick()".
Kindly provide suitable solution.
Regards,
Eashwar
Hello,
The OSIF implementation can be found in the osif_baremetal.c file.
The reload value of the SysTick is the core frequency divided by 1000, that means that the Systick interrupt is called every 1ms and increment the s_osif_tick_cnt counter.
The counter is then read and compered by the OSIF_TimeDelay() function.
If the core frequency was divided by 10000, the counter would increment every 100us (OSIF_TimeDelay(1) = 100us).
The SysTick description can be found in ARM documentation.
Cortex™-M4 Devices Generic User Guide
Section 4.4 System timer, SysTick
Regards,
Daniel
Hi Daniel,
I also have the same requirement to generate microsecond delay, but my Controllers is MPC5777C. OSIF is connected to PIT(default) and its frequency is 100MHz. I have also followed your instructions and updated divider value in "static inline void osif_UpdateTickConfig(void)" function, as shown in image below.
The problem is when I call "OSIF_TimeDelay(1)" program pointer is struck in "osif_Tick()".
Kindly provide suitable solution.
Regards,
Eashwar
thank you for you response, l have test the way you you offer,the result is correct.
i'm finding same fuction for s32k324. configuration already done can you please do my help