2252524_en-US

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

2252524_en-US

2252524_en-US

Wakeup Source Recognition after function reset from standby mode in MCAL - S32K3 RTD

Customer Company*: HERO MOTOCORP - NORMALIZED
Project Name*: N/A
Customer Contact Point* (Name & Email): Aryan Kumar [email protected]
SW Package Info*: S32K3_S32M27x Real-Time Drivers ASR R21-11 
HW* (Board/Chipset/Platform): S32K3XX (S32K344)
SW Version*: Version 6.0.0

Hello team, 

I have a customer trying to know wakeup source after standby exit in MCAL. I have seen this other post talking about the process and which APIs to use. Basically, Dan mentioned (in this post: Solved: Question about the WISR with S32K3 MCAL RTD5.0.0 - NXP Community) that Icu_Init() will clear flags if called before Platform_Init(), meaning checking wake-up source with callback looks like a limitation of the RTDs.

Also, Icu_GetInputState() uses global variables that needs to be initialized by Icu_Init(). Meaning that customer can only call Wkpu_Ip_GetInputState() function to check the WISR flags. 

So, if I understand correctly, there are 3 ways to read wake-up source:

1. Enabling Platform after standby exit, and MCU will jump to WKPU_IRQn and service the WKPU channel. If callback is needed, customer can implement workaround by assigning Wkpu structure:

Wkpu_Ip_u32ChState[0].chInit = TRUE;
Wkpu_Ip_u32ChState[0].notificationEnable = TRUE;
Wkpu_Ip_u32ChState[0].WkpuChannelNotification = IcuSignalNotification_Wkpu;

This works as expected.

2. Calling Wkpu_Ip_GetInputState() after standby exit, as Icu_GetInputState() cannot be called before Icu_Init(), but Icu initialization clears WISR flags. However, when entering the function, if both WISR & IREER bits are enabled for the requested channel, WISR is not cleared: 

Snag_153c0e4f.png

Snag_153c1a74.png

If I understand correctly, these are cleared upon calling Icu_Init(), correct?

3. Directly reading WISR/WISR_64 registers.

These three methods use either baremetal or IP layer. I have two questions:

  • How to correctly implement Wkpu_Ip_GetInputState()?
  • Is there a fix or implementation for MCAL layer, in either 6.0.0 or 7.0.0? If so, can you share the implementation?

I've attached the project I used to test this, WKPU[42] is configured. SW is S32DS v3.6.4 + RTD 6.0.0.

Best regards,
Julián

Priority: MEDIUMS32_CONFIG_TOOLS32_FLASH_TOOLS32DSSource: Direct CustomerRe: Wakeup Source Recognition after function reset from standby mode in MCAL - S32K3 RTD

Hi @DanNguyenDuy,

Thank you for the quick response, Dan! I will inform customer.

Best regards,
Julián

Re: Wakeup Source Recognition after function reset from standby mode in MCAL - S32K3 RTD

Hi @Julián_AragónM,

1. Follow AUTOSAR requirements, the Icu module doesn't provide functions that can check wakeup source directly at the MCAL layer. Icu will transfer wakeup source information to EcuM module and this module will check wakeup source. In RTD driver, EcuM is a stub module.

Follow " Specification of ECU State Manager AUTOSAR CP R21-11":

DanNguyenDuy_1-1764672092014.png

2. In Icu configuration, when user enable "IcuWkpuStandbyWakeSupport" then Icu_Init() will not clear WISR flags.

DanNguyenDuy_0-1764669163056.png

In your project, to check wakeup source in the Wkpu_Ip layer, you can refer to the below code:

DanNguyenDuy_2-1764672411408.png

When call Platform_Init(NULL_PTR); before Icu_Init(), I saw that somehow the WISR flags were erased. So, I called this function after Icu_Init() function.

Best regards,

Dan


标记 (1)
无评分
版本历史
最后更新:
‎12-03-2025 05:26 AM
更新人: