S32K344 Wake-Up sequence

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

S32K344 Wake-Up sequence

跳至解决方案
913 次查看
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 项奖励
回复
1 解答
885 次查看
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.pngJulin_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.pngJulin_AragnM_2-1776112111624.png

Best regards,
Julián

在原帖中查看解决方案

1 回复
886 次查看
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.pngJulin_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.pngJulin_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%20%E5%94%A4%E9%86%92%E5%BA%8F%E5%88%97%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2350172%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%82%A8%E5%A5%BD%EF%BC%8CNXP%E5%9B%A2%E9%98%9F%EF%BC%9A%3C%2FP%3E%3CP%3E%E6%88%91%E7%9B%AE%E5%89%8D%E6%AD%A3%E5%9C%A8%20S32K344%20MCU%20%E4%B8%8A%E5%AE%9E%E7%8E%B0%E5%BE%85%E6%9C%BA%EF%BC%88%E7%94%B5%E6%BA%90%EF%BC%89%E6%A8%A1%E5%BC%8F%E5%92%8C%E5%94%A4%E9%86%92%E5%8A%9F%E8%83%BD%E3%80%82%3C%2FP%3E%3CP%3E%E6%88%91%E8%83%BD%E5%A4%9F%E6%88%90%E5%8A%9F%E8%BF%9B%E5%85%A5%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%E7%90%86%20AN%3C%2FSTRONG%3E%20%E5%92%8C%E6%BC%94%E7%A4%BA%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%3E%20https%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%3E%E6%88%91%E8%BF%98%E7%A0%94%E7%A9%B6%E4%BA%86%E7%A4%BA%E4%BE%8B%E9%A1%B9%E7%9B%AE%3CSTRONG%3ES32K344_RTC_StandbyRAM_Wkup_S32DS_3_4_RTD_LLD_2_0%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%E7%94%B1%E6%AD%A4%EF%BC%8C%E6%88%91%E6%98%8E%E7%99%BD%E4%BA%86%EF%BC%9A%3C%2FP%3E%3CUL%3E%3CLI%3E%E6%9C%80%E5%A4%9A%E5%8F%AF%E9%85%8D%E7%BD%AE%2032KB%20%E5%BE%85%E6%9C%BA%20RAM%E3%80%82%3C%2FLI%3E%3CLI%3E%E8%AF%A5%E5%BE%85%E6%9C%BA%20RAM%20%E5%9C%A8%E5%BE%85%E6%9C%BA%E6%A8%A1%E5%BC%8F%E4%B8%8B%E4%BF%9D%E7%95%99%E3%80%82%3C%2FLI%3E%3CLI%3E%E5%AE%83%E5%8F%AF%E7%94%A8%E4%BA%8E%E8%B7%A8%E5%BE%85%E6%9C%BA%E5%91%A8%E6%9C%9F%E5%AD%98%E5%82%A8%E5%8F%98%E9%87%8F%E6%88%96%E6%95%B0%E6%8D%AE%E3%80%82%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%E4%B8%8D%E8%BF%87%EF%BC%8C%E6%88%91%E7%9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%2FLI%3E%3C%2FOL%3E%3CP%3E%E4%BB%BB%E4%BD%95%E6%8C%87%E5%AF%BC%E6%88%96%E5%8F%82%E8%80%83%E9%83%BD%E5%B0%86%E9%9D%9E%E5%B8%B8%E6%9C%89%E5%B8%AE%E5%8A%A9%E3%80%82%3C%2FP%3E%3CP%3E%E8%B0%A2%E8%B0%A2%EF%BC%81%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%3E%E5%97%A8%EF%BC%8C%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%E3%80%81%3C%2FP%3E%0A%3CP%3E%E4%B8%8E%20K1%20%E7%9B%B8%E6%AF%94%EF%BC%8C%E7%94%B5%E6%BA%90%E6%A8%A1%E5%BC%8F%E8%BD%AC%E6%8D%A2%E5%9C%A8%20K3%20%E7%B3%BB%E5%88%97%E4%B8%AD%E7%9A%84%E5%B7%A5%E4%BD%9C%E6%96%B9%E5%BC%8F%E7%95%A5%E6%9C%89%E4%B8%8D%E5%90%8C%E3%80%82%E9%86%92%E6%9D%A5%E5%90%8E%EF%BC%8CS32K3%20%E5%B0%86%E5%A7%8B%E7%BB%88%E6%89%A7%E8%A1%8C%20RESET%20%E9%A1%BA%E5%BA%8F%EF%BC%9A%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%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EJulin_AragnM_0-1776111898879.png%3C%2Fspan%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%E4%B8%8D%E8%BF%87%EF%BC%8C%E6%82%A8%E4%BB%8D%E7%84%B6%E5%8F%AF%E4%BB%A5%E9%80%9A%E8%BF%87%20WFI%20%E5%8F%AA%E5%B0%86%E6%A0%B8%E5%BF%83%E5%8F%91%E9%80%81%E5%88%B0%E5%BE%85%E6%9C%BA%E7%8A%B6%E6%80%81%E3%80%82%E4%BE%8B%E5%A6%82%EF%BC%8C%22%E7%94%B5%E6%BA%90%20%22%E9%A9%B1%E5%8A%A8%E7%A8%8B%E5%BA%8F%E4%B8%AD%E7%9A%84%3CSTRONG%3ECORE_STANDBY%3C%2FSTRONG%3E%E6%A8%A1%E5%BC%8F%E5%B0%B1%E6%98%AF%E8%BF%99%E6%A0%B7%EF%BC%9A%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%3E%E4%BD%BF%E7%94%A8%20CAN%20%E5%94%A4%E9%86%92%E9%80%80%E5%87%BA%E5%86%85%E6%A0%B8%E5%BE%85%E6%9C%BA%E6%A8%A1%E5%BC%8F%20-%20NXP%20Community%3C%2FA%3E%E3%80%82%3C%2FP%3E%0A%3C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%B0%E5%9D%80%E6%9D%A5%E8%A7%A3%E5%86%B3%E6%97%B6%E9%97%B4%E7%B4%A7%E8%BF%AB%E7%9A%84%E9%97%AE%E9%A2%98%E3%80%82%E4%BB%8D%E7%84%B6%E5%BB%BA%E8%AE%AE%E5%9C%A8%E7%94%A8%E6%88%B7%E5%AE%9A%E4%B9%89%E5%9C%B0%E5%9D%80%E4%B9%8B%E5%90%8E%E8%B7%B3%E8%BD%AC%E5%88%B0%20Reset_Handler%EF%BC%8C%E4%BB%A5%E4%BE%BF%E5%AE%8C%E5%85%A8%E5%88%9D%E5%A7%8B%E5%8C%96%E7%B3%BB%E7%BB%9F%E3%80%82%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%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EJulin_AragnM_2-1776112111624.png%3C%2Fspan%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%E8%87%B4%E4%BB%A5%E6%9C%80%E8%AF%9A%E6%8C%9A%E7%9A%84%E9%97%AE%E5%80%99%EF%BC%8C%3CBR%20%2F%3EJuli%C3%A1n%3C%2FP%3E%3C%2FLINGO-BODY%3E