2298624_en-US

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

2298624_en-US

2298624_en-US

OS Timer interface for bare metal

In the older driver model that worked with S32DS for ARM, there was an API for timer delay that supported bare metal implementation. In the new Real Time Driver model, I cannot find an equivalent. Trying to do that creates an error; please see the attached screen shot.


Is there a way to do that?


Details about the project:

MCU: S32K148 in 144 pin configuration

System OS: Bare metal

RTD version: 3.0.0

Driver configuration: Low level (non-Autosar); please see the screenshot.

durga_choudhury_0-1769130089734.pngdurga_choudhury_0-1769130089734.png



Re: OS Timer interface for bare metal

Hello @danielmartynek 


Thank you for the update. This is in agreement with what I had found. A couple of follow ups:


1. So there is no equivalent of OSIf_TimeDelay() in the Real Time drivers? I am seeing such gaps in other parts of the driver APIs as well which makes porting existing code somewhat non-trivial.


2. Are these APIs uniform across all MCAL implementations? Put another way, if I use hardware and MCAL implementation from another vendor who claims MCAL compliance, can I expect all these APIs to be available in their driver implementation? (You can read this the other way around also; if I am migrating to NXP FROM another vendor who claims MCAL compliance, can I expect NXP drivers to provide all the APIs that the other vendors driver provides?)


Best regards

Durga Choudhury

Re: OS Timer interface for bare metal

Hi @durga_choudhury,

Refer to OsIf.h, there are these functions:

OsIf_Init(),

OsIf_GetCounter(),

OsIf_MicrosToTicks(),

OsIf_GetElapsed(),


BR, Daniel



Re: OS Timer interface for bare metal

Hello @durga_choudhury,

1.

No there is no such function, individual drivers use the OsIf APIs, for example:

danielmartynek_0-1769519939394.pngdanielmartynek_0-1769519939394.png

2.

RTD includes:

  • AUTOSAR MCAL drivers
  • Low-level IP-level drivers

Only the highest (AUTOSAR) layer of MCAL is portable.

For example, Adc_Init().

But OsIf_GetElapsed() is not an AUTOSAR API, It is NXP-specific.


Regards,

Daniel




Tags (1)
No ratings
Version history
Last update:
‎01-28-2026 02:31 AM
Updated by: