S32K144 GPT Notification Callback Not Triggering on SRTC Channel - MCAL RTM 1.0.6 (AUTOSAR 4.2) + EB

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

S32K144 GPT Notification Callback Not Triggering on SRTC Channel - MCAL RTM 1.0.6 (AUTOSAR 4.2) + EB

89 Views
Aishwr
Contributor I

Hello NXP Team,

I am working on an S32K144 project using:

MCAL Package: S32K1XX_MCAL4_2_RTM_1_0_6
AUTOSAR Version: 4.2.2
EB Tresos Version: 29.0
Device: S32K144
I am facing an issue where a GPT notification callback is not being triggered, although the timer itself appears to be running correctly.

GPT Configuration
The GPT channel is configured in EB Tresos as:

Hardware Module: SRTC
Channel: SRTC_0_CH_0
Mode: Continuous
Notification: Enabled
extern void Gpt_Notification(void);

static CONST(Gpt_ChannelConfigType, GPT_CONST) Gpt_InitChannelPB[1] =
{
{
(boolean)FALSE,
&Gpt_Notification,
...
(Gpt_ChannelModeType)(GPT_CH_MODE_CONTINUOUS),
{
(uint8)(SRTC_0_CH_0),
(uint8)(GPT_SRTC_MODULE),
...
}
}
};
The value returned by Gpt_GetTimeElapsed()(used in application code ) continuously increases during runtime, indicating that:

GPT initialization is successful.
GPT timer starts successfully.
SRTC timer is counting correctly.
However:

Gpt_Notification() is never called.
Breakpoint inside Gpt_Notification() is never hit.

Could you please help clarify:
Is there any known issue with GPT notifications on SRTC_0_CH_0 in S32K1XX_MCAL4_2_RTM_1_0_6?
Does SRTC-based GPT require any additional NVIC or interrupt configuration outside the GPT module configuration?
or any other point, that may have missed.

Regards,

Aishwarya

Tags (1)
0 Kudos
Reply
1 Reply

33 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @Aishwr 

 

Please check:

 

  1. GptIsrEnable in EB Tresos - Go to Gpt -> GptHwConfiguration -> GptHwInterruptChannel. Find the entry for SRTC_0_CH_0. Check that both GptIsrEnable and GptChannelIsUsed are enabled. The default value for both of these is false, so they must be explicitly turned on, otherwise the ISR for the SRTC channel will not be active.

 

  1. Gpt_EnableNotification() call in your application code - Configuring the notification function in EB Tresos is not enough on its own. The API Gpt_EnableNotification(GptConf_GptChannelConfiguration_<YourChannelName>) must be called explicitly in your application after Gpt_StartTimer(). Without this call, the driver will not deliver the notification even if the timer fires correctly.

 

  1. Interrupt controller initialization – per driver deviations SWS_Gpt_00355 and SWS_Gpt_00356 mentioned in user manual, integration code must enable the RTC/SRTC interrupt line in the NVIC before using the GPT driver. This is not done by Gpt_Init(). Please check whether this is done in your startup or integration code, and whether it happens before Gpt_StartTimer() is called.

 

Regards,

Lukas

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2399981%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K144%20GPT%20Notification%20Callback%20Not%20Triggering%20on%20SRTC%20Channel%20-%20MCAL%20RTM%201.0.6%20(AUTOSAR%204.2)%20%2B%20EB%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2399981%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20NXP%20Team%2C%3C%2FP%3E%3CP%3EI%20am%20working%20on%20an%20S32K144%20project%20using%3A%3C%2FP%3E%3CP%3EMCAL%20Package%3A%20S32K1XX_MCAL4_2_RTM_1_0_6%3CBR%20%2F%3EAUTOSAR%20Version%3A%204.2.2%3CBR%20%2F%3EEB%20Tresos%20Version%3A%2029.0%3CBR%20%2F%3EDevice%3A%20S32K144%3CBR%20%2F%3EI%20am%20facing%20an%20issue%20where%20a%20GPT%20notification%20callback%20is%20not%20being%20triggered%2C%20although%20the%20timer%20itself%20appears%20to%20be%20running%20correctly.%3C%2FP%3E%3CP%3EGPT%20Configuration%3CBR%20%2F%3EThe%20GPT%20channel%20is%20configured%20in%20EB%20Tresos%20as%3A%3C%2FP%3E%3CP%3EHardware%20Module%3A%20SRTC%3CBR%20%2F%3EChannel%3A%20SRTC_0_CH_0%3CBR%20%2F%3EMode%3A%20Continuous%3CBR%20%2F%3ENotification%3A%20Enabled%3CBR%20%2F%3Eextern%20void%20Gpt_Notification(void)%3B%3C%2FP%3E%3CP%3Estatic%20CONST(Gpt_ChannelConfigType%2C%20GPT_CONST)%20Gpt_InitChannelPB%5B1%5D%20%3D%3CBR%20%2F%3E%7B%3CBR%20%2F%3E%7B%3CBR%20%2F%3E(boolean)FALSE%2C%3CBR%20%2F%3E%26amp%3BGpt_Notification%2C%3CBR%20%2F%3E...%3CBR%20%2F%3E(Gpt_ChannelModeType)(GPT_CH_MODE_CONTINUOUS)%2C%3CBR%20%2F%3E%7B%3CBR%20%2F%3E(uint8)(SRTC_0_CH_0)%2C%3CBR%20%2F%3E(uint8)(GPT_SRTC_MODULE)%2C%3CBR%20%2F%3E...%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%7D%3B%3CBR%20%2F%3EThe%20value%20returned%20by%20Gpt_GetTimeElapsed()(used%20in%20application%20code%20)%20continuously%20increases%20during%20runtime%2C%20indicating%20that%3A%3C%2FP%3E%3CP%3EGPT%20initialization%20is%20successful.%3CBR%20%2F%3EGPT%20timer%20starts%20successfully.%3CBR%20%2F%3ESRTC%20timer%20is%20counting%20correctly.%3CBR%20%2F%3EHowever%3A%3C%2FP%3E%3CP%3EGpt_Notification()%20is%20never%20called.%3CBR%20%2F%3EBreakpoint%20inside%20Gpt_Notification()%20is%20never%20hit.%3C%2FP%3E%3CP%3ECould%20you%20please%20help%20clarify%3A%3CBR%20%2F%3EIs%20there%20any%20known%20issue%20with%20GPT%20notifications%20on%20SRTC_0_CH_0%20in%20S32K1XX_MCAL4_2_RTM_1_0_6%3F%3CBR%20%2F%3EDoes%20SRTC-based%20GPT%20require%20any%20additional%20NVIC%20or%20interrupt%20configuration%20outside%20the%20GPT%20module%20configuration%3F%3CBR%20%2F%3Eor%20any%20other%20point%2C%20that%20may%20have%20missed.%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3EAishwarya%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2400545%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K144%20GPT%20Notification%20Callback%20Not%20Triggering%20on%20SRTC%20Channel%20-%20MCAL%20RTM%201.0.6%20(AUTOSAR%204.2)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2400545%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F250624%22%20target%3D%22_blank%22%3E%40Aishwr%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EPlease%20check%3A%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3COL%3E%0A%3CLI%3EGptIsrEnable%20in%20EB%20Tresos%20-%20Go%20to%20Gpt%20-%26gt%3B%20GptHwConfiguration%20-%26gt%3B%20GptHwInterruptChannel.%20Find%20the%20entry%20for%20SRTC_0_CH_0.%20Check%20that%20both%20GptIsrEnable%20and%20GptChannelIsUsed%20are%20enabled.%20The%20default%20value%20for%20both%20of%20these%20is%20false%2C%20so%20they%20must%20be%20explicitly%20turned%20on%2C%20otherwise%20the%20ISR%20for%20the%20SRTC%20channel%20will%20not%20be%20active.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CBR%20%2F%3E%0A%3COL%20start%3D%222%22%3E%0A%3CLI%3EGpt_EnableNotification()%20call%20in%20your%20application%20code%20-%20Configuring%20the%20notification%20function%20in%20EB%20Tresos%20is%20not%20enough%20on%20its%20own.%20The%20API%20Gpt_EnableNotification(GptConf_GptChannelConfiguration_%3CYOURCHANNELNAME%3E)%20must%20be%20called%20explicitly%20in%20your%20application%20after%20Gpt_StartTimer().%20Without%20this%20call%2C%20the%20driver%20will%20not%20deliver%20the%20notification%20even%20if%20the%20timer%20fires%20correctly.%3C%2FYOURCHANNELNAME%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CBR%20%2F%3E%0A%3COL%20start%3D%223%22%3E%0A%3CLI%3EInterrupt%20controller%20initialization%20%E2%80%93%20per%20driver%20deviations%20SWS_Gpt_00355%20and%20SWS_Gpt_00356%20mentioned%20in%20user%20manual%2C%20integration%20code%20must%20enable%20the%20RTC%2FSRTC%20interrupt%20line%20in%20the%20NVIC%20before%20using%20the%20GPT%20driver.%20This%20is%20not%20done%20by%20Gpt_Init().%20Please%20check%20whether%20this%20is%20done%20in%20your%20startup%20or%20integration%20code%2C%20and%20whether%20it%20happens%20before%20Gpt_StartTimer()%20is%20called.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CBR%20%2F%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3ELukas%3C%2FP%3E%3C%2FLINGO-BODY%3E