S32K344 Wake-Up sequence

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

S32K344 Wake-Up sequence

Jump to solution
456 Views
Abinandhan
Contributor I

Hi NXP Team,

I am currently implementing standby (low-power) mode and wake-up functionality on the S32K344 MCU.

I am able to successfully enter standby mode and wake up from it. However, after wake-up, the execution always restarts from the main() function instead of resuming from the point where it entered standby mode.

My requirement is to resume execution from the exact point where the MCU entered standby mode, rather than restarting from main().

To address this, I referred to multiple community posts and the following NXP documentation:
S32K3 Low Power Management AN and demos
https://community.nxp.com/t5/S32K-Knowledge-Base/S32K3-Low-Power-Management-AN-and-demos/ta-p/152772...

I also studied the example project S32K344_RTC_StandbyRAM_Wkup_S32DS_3_4_RTD_LLD_2_0


From this, I understand that:

  • Up to 32KB of Standby RAM can be configured.
  • This Standby RAM is retained during standby mode.
  • It can be used to store variables or data across standby cycles.

However, my goal is to resume execution flow from where it left off before entering standby, not just restore variables from Standby RAM. I could not find any clear guidance or solution for this requirement.

Could you please clarify:

  1. Is it possible to resume execution from the exact point where the MCU entered standby mode on S32K344?
  2. If not, what is the recommended approach to achieve similar behavior?

Any guidance or references would be very helpful.

Thank you.

0 Kudos
Reply
1 Solution
428 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Abinandhan,

Low power mode transition works somewhat different in the K3 family, compared to the K1. S32K3 will always perform a reset sequence after waking up:

Julin_AragnM_0-1776111898879.png

You can still send only the core to standby with WFI, though. For example, the CORE_STANDBY mode in 'Power' driver does this: exiting core standby mode using CAN wakeup - NXP Community.

Keep in mind that CORE_STANDBY only stops clock for the core, it has nothing to do with STANDBY mode. CORE_STANDBY mode can be useful for some use cases where all peripherals need to be up and only core is stopped for a while.

STANDBY mode should be used instead to reduce current consumption.

Alternatively, the K3 also supports a 'Fast Wakeup', where the MCU will enter a user-defined boot address, which you can use for time-critical issues. It is still recommended to jump to Reset_Handler after the user-defined address, in order to fully initialize the system.

Julin_AragnM_2-1776112111624.png

Best regards,
Julián

View solution in original post

1 Reply
429 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Abinandhan,

Low power mode transition works somewhat different in the K3 family, compared to the K1. S32K3 will always perform a reset sequence after waking up:

Julin_AragnM_0-1776111898879.png

You can still send only the core to standby with WFI, though. For example, the CORE_STANDBY mode in 'Power' driver does this: exiting core standby mode using CAN wakeup - NXP Community.

Keep in mind that CORE_STANDBY only stops clock for the core, it has nothing to do with STANDBY mode. CORE_STANDBY mode can be useful for some use cases where all peripherals need to be up and only core is stopped for a while.

STANDBY mode should be used instead to reduce current consumption.

Alternatively, the K3 also supports a 'Fast Wakeup', where the MCU will enter a user-defined boot address, which you can use for time-critical issues. It is still recommended to jump to Reset_Handler after the user-defined address, in order to fully initialize the system.

Julin_AragnM_2-1776112111624.png

Best regards,
Julián

%3CLINGO-SUB%20id%3D%22lingo-sub-2350172%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K344%20Wake-Up%20sequence%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2350172%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20NXP%20Team%2C%3C%2FP%3E%3CP%3EI%20am%20currently%20implementing%20standby%20(low-power)%20mode%20and%20wake-up%20functionality%20on%20the%20S32K344%20MCU.%3C%2FP%3E%3CP%3EI%20am%20able%20to%20successfully%20enter%20standby%20mode%20and%20wake%20up%20from%20it.%20However%2C%20after%20wake-up%2C%20the%20execution%20always%20restarts%20from%20the%20%3CSTRONG%3Emain()%3C%2FSTRONG%3E%20function%20instead%20of%20resuming%20from%20the%20point%20where%20it%20entered%20standby%20mode.%3C%2FP%3E%3CP%3EMy%20requirement%20is%20to%20resume%20execution%20from%20the%20exact%20point%20where%20the%20MCU%20entered%20standby%20mode%2C%20rather%20than%20restarting%20from%20main().%3C%2FP%3E%3CP%3ETo%20address%20this%2C%20I%20referred%20to%20multiple%20community%20posts%20and%20the%20following%20NXP%20documentation%3A%3CBR%20%2F%3E%E2%80%9C%3CSTRONG%3ES32K3%20Low%20Power%20Management%20AN%20and%20demos%3C%2FSTRONG%3E%E2%80%9D%3CBR%20%2F%3E%3CFONT%20color%3D%22%230000FF%22%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FS32K3-Low-Power-Management-AN-and-demos%2Fta-p%2F1527724%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FS32K3-Low-Power-Management-AN-and-demos%2Fta-p%2F1527724%3C%2FA%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3EI%20also%20studied%20the%20example%20project%20%3CSTRONG%3ES32K344_RTC_StandbyRAM_Wkup_S32DS_3_4_RTD_LLD_2_0%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EFrom%20this%2C%20I%20understand%20that%3A%3C%2FP%3E%3CUL%3E%3CLI%3EUp%20to%2032KB%20of%20Standby%20RAM%20can%20be%20configured.%3C%2FLI%3E%3CLI%3EThis%20Standby%20RAM%20is%20retained%20during%20standby%20mode.%3C%2FLI%3E%3CLI%3EIt%20can%20be%20used%20to%20store%20variables%20or%20data%20across%20standby%20cycles.%3C%2FLI%3E%3C%2FUL%3E%3CP%3EHowever%2C%20my%20goal%20is%20to%20resume%20execution%20flow%20from%20where%20it%20left%20off%20before%20entering%20standby%2C%20not%20just%20restore%20variables%20from%20Standby%20RAM.%20I%20could%20not%20find%20any%20clear%20guidance%20or%20solution%20for%20this%20requirement.%3C%2FP%3E%3CP%3ECould%20you%20please%20clarify%3A%3C%2FP%3E%3COL%3E%3CLI%3EIs%20it%20possible%20to%20resume%20execution%20from%20the%20exact%20point%20where%20the%20MCU%20entered%20standby%20mode%20on%20S32K344%3F%3C%2FLI%3E%3CLI%3EIf%20not%2C%20what%20is%20the%20recommended%20approach%20to%20achieve%20similar%20behavior%3F%3C%2FLI%3E%3C%2FOL%3E%3CP%3EAny%20guidance%20or%20references%20would%20be%20very%20helpful.%3C%2FP%3E%3CP%3EThank%20you.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2350325%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K344%20Wake-Up%20sequence%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2350325%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%2F249590%22%20target%3D%22_blank%22%3E%40Abinandhan%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3ELow%20power%20mode%20transition%20works%20somewhat%20different%20in%20the%20K3%20family%2C%20compared%20to%20the%20K1.%20S32K3%20will%20always%20perform%20a%20reset%20sequence%20after%20waking%20up%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Julin_AragnM_0-1776111898879.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Julin_AragnM_0-1776111898879.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F382169i99FE1D60704C1C22%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Julin_AragnM_0-1776111898879.png%22%20alt%3D%22Julin_AragnM_0-1776111898879.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EYou%20can%20still%20send%20only%20the%20core%20to%20standby%20with%20WFI%2C%20though.%20For%20example%2C%20the%20%3CSTRONG%3ECORE_STANDBY%3C%2FSTRONG%3E%20mode%20in%20'Power'%20driver%20does%20this%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K%2Fexiting-core-standby-mode-using-CAN-wakeup%2Ftd-p%2F1768231%22%20target%3D%22_blank%22%3Eexiting%20core%20standby%20mode%20using%20CAN%20wakeup%20-%20NXP%20Community%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3EKeep%20in%20mind%20that%20CORE_STANDBY%20only%20stops%20clock%20for%20the%20core%2C%20it%20has%20nothing%20to%20do%20with%20STANDBY%20mode.%20CORE_STANDBY%20mode%20can%20be%20useful%20for%20some%20use%20cases%20where%20all%20peripherals%20need%20to%20be%20up%20and%20only%20core%20is%20stopped%20for%20a%20while.%3C%2FP%3E%0A%3CP%3ESTANDBY%20mode%20should%20be%20used%20instead%20to%20reduce%20current%20consumption.%3C%2FP%3E%0A%3CP%3EAlternatively%2C%20the%20K3%20also%20supports%20a%20'Fast%20Wakeup'%2C%20where%20the%20MCU%20will%20enter%20a%20user-defined%20boot%20address%2C%20which%20you%20can%20use%20for%20time-critical%20issues.%20It%20is%20still%20recommended%20to%20jump%20to%20Reset_Handler%20after%20the%20user-defined%20address%2C%20in%20order%20to%20fully%20initialize%20the%20system.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Julin_AragnM_2-1776112111624.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Julin_AragnM_2-1776112111624.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F382171iBFC24D821C9FA87A%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Julin_AragnM_2-1776112111624.png%22%20alt%3D%22Julin_AragnM_2-1776112111624.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3CBR%20%2F%3EJuli%C3%A1n%3C%2FP%3E%3C%2FLINGO-BODY%3E