is it possible to use OSIF_TimeDelay() without RTOS interface

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

is it possible to use OSIF_TimeDelay() without RTOS interface

Jump to solution
1,400 Views
bhanu_p
Contributor I

Hi,

I need to know regarding usage of OSIF_TimeDelay in S32k146 non RTOS codebase. I am not using any kind of OS interface in my application. I just want to know is it possoble to use OSIF_TimeDelay()  function  in normal BareMetal code  without any code hangs or it hangs in osif forever if i dont use RTOS.

0 Kudos
Reply
1 Solution
1,373 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @bhanu_p,

Yes, you can implement OSIF driver in bare-metal, it is based on the internal SysTick (Solved: how to set systick to get microsecond(us) delay in use s32k144 - NXP Community). Actually, the SDK documentation (under SDK installation C:\NXP\S32DS.3.4\S32DS\software\S32SDK_S32K1XX_RTM_4.0.3\doc) explains how to implement the bare-metal option:

Julin_AragnM_0-1734026621351.png

Julin_AragnM_1-1734026625534.png

It is only necessary to link the osif_baremetal.c file (and osif.h), and call the OSIF_TimeDelay function, which will initialize the timer, since the timer is initialized at the first call in OSIF that needs timing.

Best regards,
Julián

View solution in original post

0 Kudos
Reply
1 Reply
1,374 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @bhanu_p,

Yes, you can implement OSIF driver in bare-metal, it is based on the internal SysTick (Solved: how to set systick to get microsecond(us) delay in use s32k144 - NXP Community). Actually, the SDK documentation (under SDK installation C:\NXP\S32DS.3.4\S32DS\software\S32SDK_S32K1XX_RTM_4.0.3\doc) explains how to implement the bare-metal option:

Julin_AragnM_0-1734026621351.png

Julin_AragnM_1-1734026625534.png

It is only necessary to link the osif_baremetal.c file (and osif.h), and call the OSIF_TimeDelay function, which will initialize the timer, since the timer is initialized at the first call in OSIF that needs timing.

Best regards,
Julián

0 Kudos
Reply