2388301_en-US

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

2388301_en-US

2388301_en-US

Invokation of OsIf_GetCounter in Autosar program causes E_OS_CALLEVEL

Hi Team,

We are using the NXP S32K588 in an AUTOSAR-based program, with ETAS OS and EB MCAL.

Several MCAL components provide a timeout mechanism where the timeout method can be configured as either:

  • OSIF_COUNTER_SYSTEM
  • OSIF_COUNTER_DUMMY

When the timeout method is configured as OSIF_COUNTER_SYSTEM, the affected drivers attempt to access OSIF counters through OsIf_GetCounter() during their initialization sequence.

Since these driver initialization functions are called from EcuM_Init(), the AUTOSAR OS reports an error via:

ErrorHook => E_OS_CALLEVEL

_Naveen__0-1782813128855.png

Our understanding is that this occurs because AUTOSAR OS counter APIs are only permitted to be accessed from valid OS contexts such as Tasks or ISRs, whereas EcuM_Init() executes before the OS scheduler is started.

Could you please advise on the recommended approach to handle this situation? Specifically:

  • Is there a recommended configuration for MCAL timeout handling during pre-OS initialization?
  • Should OSIF_COUNTER_DUMMY be used for drivers initialized from EcuM_Init()?
  • Are there any ETAS OS, EB MCAL, or NXP-specific guidelines/workarounds to enable timeout functionality safely during the pre-OS phase?



Re: Invokation of OsIf_GetCounter in Autosar program causes E_OS_CALLEVEL

Hi,

thanks, let me ask SW/RTD team if they can provide any additional feedback.

BR, Petr

Re: Invokation of OsIf_GetCounter in Autosar program causes E_OS_CALLEVEL

Hi, 

Your analysis seems correct. If a driver configured with OSIF_COUNTER_SYSTEM is initialized from EcuM_Init() before the OS is started, calls to OsIf_GetCounter() may result in E_OS_CALLEVEL, depending on the AUTOSAR OS implementation.

For modules initialized during the pre-OS phase, a common workaround is to avoid using OS-based timing services and use OSIF_COUNTER_DUMMY (or another non-OS timing source) instead.

The exact recommendation may also depend on the ETAS OS implementation and the MCAL/RTD version being used. Could you please share the S32DS and RTD (or MCAL) versions for further verification?

BR, Petr

タグ(1)
評価なし
バージョン履歴
最終更新日:
昨日
更新者: