The error of GetCounterValue during initialization in case using AUTOSAR OS

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

The error of GetCounterValue during initialization in case using AUTOSAR OS

712件の閲覧回数
MickMick
Contributor II

Hi

I embedded RTD "S32K3_M27X Real-Time Drivers Version 3.0.0 P07" as MCAL in the AUTOSAR system and the error occurs and the Mcu initialization process fails.

Mcu_Init() is called in the startup process and AUTOASAR OS API GetCounterValue() is called from there.
However, GetCounterValue() can only be called in Task or ISR2, therefore it causes the error to call GetCounterValue() in the startup routine which is called before the OS starts.
I think, however, that Mcu_Init() is called in the startup routine is correct because it is written so in the RTD MCU instruction manual and the specification of AUTOSAR ECU state manager.

In addition, OSIF_COUNTER_SYSTEM has been chosen as the Mcu Timeout Method.

Could you let me know how we can avoid the error?

タグ(1)
0 件の賞賛
2 返答(返信)

466件の閲覧回数
CongDang
NXP Employee
NXP Employee

Unfortunately, I lack knowledge on AUTOSAR OS, so I'm not sure if there is a way that AUTOSAR OS is initialized before calling Mcu_Init() (if still keeping Mcu_Init() being called in the startup process as you requested). But I think not.
So I guess the way you can do it is configure OsIfOperatingSystemType with OsIfBaremetalType

0 件の賞賛

415件の閲覧回数
MickMick
Contributor II

Thank you for your suggestion.

We also lacked knowledge of the AUTOSAR OS and could not get it to work properly using OSIF_COUNTER_SYSTEM.
Therefore, we decided to use OSIF_COUNTER_DUMMY.

Thank you again.

0 件の賞賛