OS Timer interface for bare metal

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

OS Timer interface for bare metal

Jump to solution
829 Views
durga_choudhury
Contributor V

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.png

 

 

Tags (1)
0 Kudos
Reply
1 Solution
703 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @durga_choudhury,

1.

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

danielmartynek_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

 

 

 

View solution in original post

0 Kudos
Reply
3 Replies
748 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @durga_choudhury,

Refer to OsIf.h, there are these functions:

OsIf_Init(),

OsIf_GetCounter(),

OsIf_MicrosToTicks(),

OsIf_GetElapsed(),

 

BR, Daniel

 

 

0 Kudos
Reply
729 Views
durga_choudhury
Contributor V

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

Tags (1)
0 Kudos
Reply
704 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @durga_choudhury,

1.

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

danielmartynek_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

 

 

 

0 Kudos
Reply