2364026_en-US

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

2364026_en-US

2364026_en-US

Hardfault occurred with AUTOSAR GPT module for STM Timer in S32K344

Hi NXP, 

I tried to utilize the STM Timer with AUTOSAR's GPT Module (on S32 Design Studio). Despite multiple attempts of changing the configuration by changing the clock source, removing the notification callbacks etc., but hardfaults always occurs. It occurs while the Stm_Ip_DebugMode() is getting executed and it is calling the API to enter the SchM Exclusive Area for the GPT. Please provide your support to resolve this issue.


 S32K344-WB  

Re: Hardfault occurred with AUTOSAR GPT module for STM Timer in S32K344

Hello @VaneB ,

I am using the 6.0.0 version of the Real time drivers which supports AUTOSAR 4.7 standards.


Re: Hardfault occurred with AUTOSAR GPT module for STM Timer in S32K344

Hi @a1g1 

It seems you might be using an older RTD version. We generally recommend using the latest RTD release, as it includes bug fixes, improvements, and new features.

Could you please try with the latest version and let me know if the issue still persists?

In the meantime, it would also help if you could share the exact RTD version you are currently using so we can better analyze the situation.


BR, VaneB

Re: Hardfault occurred with AUTOSAR GPT module for STM Timer in S32K344

Hi @a1g1 

Thank you for the clarification, and I apologize for the previous confusion.

I have reviewed the .mex file you shared and have a few observations:

  • In the MCU driver, the peripheral clock is not enabled. This should be configured under MCU Driver → McuModuleConfiguration → McuModeSettingConf → McuPeripheral
  • In the Clock Tool, you selected FIRC_CLK as the STM0 clock source. However, in MCU Driver → McuModuleConfiguration → McuClockSettingConfig → McuClockReferencePoint, there is only one reference defined (AIPS_SLOW_CLK). Please add a new clock reference using FIRC_CLK, and then select it as the GptClockReferencePoint in Gpt Driver → GptDriverConfiguration → GptClockReferencePoint.
  • In the GPT driver, no GptNotification has been configured. Additionally, the code is still using a notification function with a PIT-related name (Gpt_PitNotification), which should be updated.

For ease of reference, I am attaching the main file and the .mex configuration I used, so you can compare them on your side.

Re: Hardfault occurred with AUTOSAR GPT module for STM Timer in S32K344Hi @VaneB,

Let me check this and see. Thanks!

BR
@a1g1
Re: Hardfault occurred with AUTOSAR GPT module for STM Timer in S32K344

Hello @VaneB ,


Thank you for your support. It is working now. After taking the configuration changes you had suggested, I went thru your code and found that I hadn't been calling that Mcu_SetMode API. This prevented the code from going into hardfault.


Thanks and Best Regards,

@a1g1 

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