S32K312: unknown signal handler taking program control to LPI2C IRQ handler

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

S32K312: unknown signal handler taking program control to LPI2C IRQ handler

579 Views
himonkoch
Contributor III

I am using a custom board fitted with S32K312 MCU. I want to continuously change the pin config and clock config for power saving feature. When testing the MCU gets "stuck" in a high power state, causing increased power consumption.

When I connect my PE-micro debugger to the board and attach to running target, the control always shows up at the "Lpi2c_Ip_ModuleIRQHandler" function. The debug call-stack shows a signal handler at 0xffffffe9.

 

What is causing this and how can I solve this?

 

#s32k312

0 Kudos
Reply
9 Replies

548 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @himonkoch,

Could you clarify what routine and configuration you are using when saying "I want to continuously change the pin config and clock config for power saving feature."? 

Are you going to standby and waking up repeatedly? Have you referred to any of the low power examples for S32K3? S32K3 Low Power Management AN and demos - NXP Community & [RTD400 & 500 MCAL & IP] S32K3 Low Power Management AN and demos - NXP Community.

Also, before going to standby, are you de-initializing I2C instance?

Lpi2c_Ip_MasterDeinit(instance);

Please share any relevant configuration or code snippet.

Best regards,
Julián

0 Kudos
Reply

537 Views
himonkoch
Contributor III

@Julián_AragónM 

This feature does not utilise the standby power mode of the MCU, rather I am reducing the power consumption by disabling certain clocks, reducing the overall clock speed, and disabling certain pin outputs.

This is done using different Clock and Pin functional groups, which I switch between to obtain the desired output.

Also before this transition, I am calling the Lpi2c_Ip_MasterDeinit() function to disable any i2c involvement.

0 Kudos
Reply

511 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @himonkoch

Thank you for the additional information. Are you specifically using Option E - Low-Speed Run mode (CORE_CLK @ 3 MHz)?

I asume you are getting stuck at Lpi2c_Ip_ModuleIRQHandler because LPI2C interrupt remains enabled or pending, although it is quite hard without sharing configuration or routine to test it.

Before switching the clock configuration, abort or complete any pending transfer, you can use Lpi2c_Ip_MasterEndTransfer(), for example. Added to this, try clearing and disabling interrupts through the IntCtrl driver:

IntCtrl_Ip_DisableIrq(LPI2C0_Master_Slave_IRQn);
IntCtrl_Ip_ClearPending(LPI2C0_Master_Slave_IRQn);

Lastly, please make sure that AIPS_SLOW_CLK and LPI2C0_CLK are both enabled when returning from VLSR.

Best regards,
Julián

0 Kudos
Reply

476 Views
himonkoch
Contributor III

@Julián_AragónM , thanks for the reply.

Yes, this feature is an implementation of the Low Power Run mode, wherein the clock frequency is reduced to 3MHz by reducing the output frequency of the FIRC, and disabling the PLL.

 

I've tried the steps you've mentioned
1. AIPS_SLOW_CLK and LPI2C0_CLK and successfully enabled when switching out of Low Power run mode

2. IntCtrl_Ip_DisableIrq and IntCtrl_Ip_ClearPending are called right before the mode switch to disable and clear the interrupts associated with I2C.

3. I could not find the Lpi2c_Ip_MasterEndTransfer function in the Lpi2c_Ip header file.

 

The problem of getting stuck in the mentioned address still exists.

 

During an internal discussion with my team, it was found that the execution was stuck in the same address in the firmware when a different and unrelated problem are being debugged. Is it possible for the running target debug configuration to show the incorrect problem address?

0 Kudos
Reply

464 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @himonkoch,

Most likely yes.

ARM documentation shows that 0xFFFFFFE9 refers to return to thread mode, exception return uses floating-point state from main SP and execution uses main SP after return.

Snag_1a5ff30.png

You can refer to the following document: HOW TO DEBUG A FAULT EXCEPTION ON ARM CORTEX M MCU. You can try to locate the Fault Address by stack Backtrace, since in your stack trace you have not returned from the interrupt yet, you are still in the handler.

Best regards,
Julián

0 Kudos
Reply

428 Views
himonkoch
Contributor III

Hi @Julián_AragónM,

I will be looking into the document you've sent and try.

 

Meanwhile, while trying to re-create the problem in Debug_FLASH debug session, this issue never occurred and execution of the feature went about uninterrupted. So far the firmware pushed into the MCU was the bin file generated after building the code with Release_FLASH build configuration. To my limited knowledge, this build configuration incorporates compiler level optimizations.

To confirm this theory I ended up building the code again with Debug_FLASH build configuration and pushed the generated bin file into the MCU directly and waited for the problem to occur, which did not happen.

 

Is there any way we can change the optimization settings in the IDE for the Release_FLASH build config that can help change the outcome?

0 Kudos
Reply

408 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @himonkoch,

You can change optimization levels for your current build configuration by right clicking the selected project and going to "Properties > C/C++ Build > Settings > Standard S32DS C Compiler > Optimization".

Snag_37e90d9.png

Just keep in mind that RTD package is tested and delivered with optimization level -Os, as stated in the release notes for the respective package:

Snag_387f777.png

Best regards,
Julián

0 Kudos
Reply

278 Views
himonkoch
Contributor III

Hello @Julián_AragónM ,

 

I did just that and now the new bin file does not have the problem. Thanks for the help.

However, I would still like to know why the optimization causes the random interrupt trigger in the first place since later on I would like to reduce the file size of the binary file.

0 Kudos
Reply

228 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @himonkoch,

It is quite hard to find the root cause for the issue without having a SW + HW to re-create it.

Anyhow, NXP guarantees the functionality of the RTD only when the compiler options are configured according to the release notes. The RTD was developed and tested under the specific settings stated in section 2.7.2, as I've shared in my previous reply.

If you choose to use custom compiler flags or optimization levels, you are responsible for verifying the functionality of the drivers under those conditions.

I'm glad the new bin does not have the problem anymore.

Best regards,
Julián

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2198370%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K312%3A%20unknown%20signal%20handler%20taking%20program%20control%20to%20LPI2C%20IRQ%20handler%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2198370%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20am%20using%20a%20custom%20board%20fitted%20with%20S32K312%20MCU.%20I%20want%20to%20continuously%20change%20the%20pin%20config%20and%20clock%20config%20for%20power%20saving%20feature.%20When%20testing%20the%20MCU%20gets%20%22stuck%22%20in%20a%20high%20power%20state%2C%20causing%20increased%20power%20consumption.%3CBR%20%2F%3E%3CBR%20%2F%3EWhen%20I%20connect%20my%20PE-micro%20debugger%20to%20the%20board%20and%20attach%20to%20running%20target%2C%20the%20control%20always%20shows%20up%20at%20the%20%22Lpi2c_Ip_ModuleIRQHandler%22%20function.%20The%20debug%20call-stack%20shows%20a%20signal%20handler%20at%200xffffffe9.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EWhat%20is%20causing%20this%20and%20how%20can%20I%20solve%20this%3F%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%23s32k312%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2204622%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K312%3A%20unknown%20signal%20handler%20taking%20program%20control%20to%20LPI2C%20IRQ%20handler%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2204622%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%2F236613%22%20target%3D%22_blank%22%3E%40himonkoch%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EIt%20is%20quite%20hard%20to%20find%20the%20root%20cause%20for%20the%20issue%20without%20having%20a%20SW%20%2B%20HW%20to%20re-create%20it.%3C%2FP%3E%0A%3CP%3EAnyhow%2C%26nbsp%3BNXP%20guarantees%20the%20functionality%20of%20the%20RTD%20only%20when%20the%20compiler%20options%20are%20configured%20according%20to%20the%20release%20notes.%20The%20RTD%20was%20developed%20and%20tested%20under%20the%20specific%20settings%20stated%20in%20section%202.7.2%2C%20as%20I've%20shared%20in%20my%20previous%20reply.%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EIf%20you%20choose%20to%20use%20custom%20compiler%20flags%20or%20optimization%20levels%2C%20you%20are%20responsible%20for%20verifying%20the%20functionality%20of%20the%20drivers%20under%20those%20conditions.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EI'm%20glad%20the%20new%20bin%20does%20not%20have%20the%20problem%20anymore.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EBest%20regards%2C%3CBR%20%2F%3EJuli%C3%A1n%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2204132%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K312%3A%20unknown%20signal%20handler%20taking%20program%20control%20to%20LPI2C%20IRQ%20handler%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2204132%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F200831%22%20target%3D%22_blank%22%3E%40Juli%C3%A1n_Arag%C3%B3nM%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EI%20did%20just%20that%20and%20now%20the%20new%20bin%20file%20does%20not%20have%20the%20problem.%20Thanks%20for%20the%20help.%3C%2FP%3E%3CP%3EHowever%2C%20I%20would%20still%20like%20to%20know%20why%20the%20optimization%20causes%20the%20random%20interrupt%20trigger%20in%20the%20first%20place%20since%20later%20on%20I%20would%20like%20to%20reduce%20the%20file%20size%20of%20the%20binary%20file.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2200949%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K312%3A%20unknown%20signal%20handler%20taking%20program%20control%20to%20LPI2C%20IRQ%20handler%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2200949%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%2F236613%22%20target%3D%22_blank%22%3E%40himonkoch%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EYou%20can%20change%20optimization%20levels%20for%20your%20current%20build%20configuration%20by%20right%20clicking%20the%20selected%20project%20and%20going%20to%20%22Properties%20%26gt%3B%20C%2FC%2B%2B%20Build%20%26gt%3B%20Settings%20%26gt%3B%20Standard%20S32DS%20C%20Compiler%20%26gt%3B%20Optimization%22.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Snag_37e90d9.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Snag_37e90d9.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F364470iE04F723B1316F69C%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Snag_37e90d9.png%22%20alt%3D%22Snag_37e90d9.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22transition%3A%20none%3B%20animation-duration%3A%200s%3B%22%3EJust%20keep%20in%20mind%20that%20RTD%20package%20is%20tested%20and%20delivered%20with%20optimization%20level%20-Os%2C%20as%20stated%20in%20the%20release%20notes%20for%20the%20respective%20package%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Snag_387f777.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Snag_387f777.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F364471i4FC532FBE27AB2B9%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Snag_387f777.png%22%20alt%3D%22Snag_387f777.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%3CLINGO-SUB%20id%3D%22lingo-sub-2200565%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K312%3A%20unknown%20signal%20handler%20taking%20program%20control%20to%20LPI2C%20IRQ%20handler%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2200565%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%2F200831%22%20target%3D%22_blank%22%3E%40Juli%C3%A1n_Arag%C3%B3nM%3C%2FA%3E%2C%3C%2FP%3E%3CP%3EI%20will%20be%20looking%20into%20the%20document%20you've%20sent%20and%20try.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EMeanwhile%2C%20while%20trying%20to%20re-create%20the%20problem%20in%20Debug_FLASH%20debug%20session%2C%20this%20issue%20never%20occurred%20and%20execution%20of%20the%20feature%20went%20about%20uninterrupted.%20So%20far%20the%20firmware%20pushed%20into%20the%20MCU%20was%20the%20bin%20file%20generated%20after%20building%20the%20code%20with%20Release_FLASH%20build%20configuration.%20To%20my%20limited%20knowledge%2C%20this%20build%20configuration%20incorporates%20compiler%20level%20optimizations.%3C%2FP%3E%3CP%3ETo%20confirm%20this%20theory%20I%20ended%20up%20building%20the%20code%20again%20with%20Debug_FLASH%20build%20configuration%20and%20pushed%20the%20generated%20bin%20file%20into%20the%20MCU%20directly%20and%20waited%20for%20the%20problem%20to%20occur%2C%20which%20did%20not%20happen.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EIs%20there%20any%20way%20we%20can%20change%20the%20optimization%20settings%20in%20the%20IDE%20for%20the%20Release_FLASH%20build%20config%20that%20can%20help%20change%20the%20outcome%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2200368%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K312%3A%20unknown%20signal%20handler%20taking%20program%20control%20to%20LPI2C%20IRQ%20handler%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2200368%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%2F236613%22%20target%3D%22_blank%22%3E%40himonkoch%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EMost%20likely%20yes.%3C%2FP%3E%0A%3CP%3EARM%20documentation%20shows%20that%200xFFFFFFE9%20refers%20to%20return%20to%20thread%20mode%2C%26nbsp%3Bexception%20return%20uses%20floating-point%20state%20from%20main%20SP%20and%20execution%20uses%20main%20SP%20after%20return.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Snag_1a5ff30.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Snag_1a5ff30.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F364329iB71C2D312E2DA12C%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Snag_1a5ff30.png%22%20alt%3D%22Snag_1a5ff30.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EYou%20can%20refer%20to%20the%20following%20document%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.google.com%2Furl%3Fsa%3Dt%26amp%3Brct%3Dj%26amp%3Bq%3D%26amp%3Besrc%3Ds%26amp%3Bsource%3Dweb%26amp%3Bcd%3D%26amp%3Bcad%3Drja%26amp%3Buact%3D8%26amp%3Bved%3D2ahUKEwiQ3IOu0N6QAxUyIEQIHWZJMj4QFnoECBgQAQ%26amp%3Burl%3Dhttps%253A%252F%252Fcommunity.nxp.com%252Fpwmxy87654%252Fattachments%252Fpwmxy87654%252FS32K%252540tkb%252F128%252F1%252FHow%252520To%252520Debug%252520A%252520Fault%252520Exception%252520On%252520ARM%252520Cortex-M(V7M)%252520MCU(S32K3XX).pdf%26amp%3Busg%3DAOvVaw2wzPbjlZ_MfgQJdmyYUWAL%26amp%3Bopi%3D89978449%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EHOW%20TO%20DEBUG%20A%20FAULT%20EXCEPTION%20ON%20ARM%20CORTEX%20M%20MCU.%3C%2FA%3E%26nbsp%3BYou%20can%20try%20to%20locate%20the%20Fault%20Address%20by%20stack%20Backtrace%2C%20since%20i%3CSPAN%3En%20your%20stack%20trace%20you%20have%20not%20returned%20from%20the%20interrupt%20yet%2C%20you%20are%20still%20in%20the%20handler.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EBest%20regards%2C%3CBR%20%2F%3EJuli%C3%A1n%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2200036%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K312%3A%20unknown%20signal%20handler%20taking%20program%20control%20to%20LPI2C%20IRQ%20handler%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2200036%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F200831%22%20target%3D%22_blank%22%3E%40Juli%C3%A1n_Arag%C3%B3nM%3C%2FA%3E%26nbsp%3B%2C%20thanks%20for%20the%20reply.%3C%2FP%3E%3CP%3EYes%2C%20this%20feature%20is%20an%20implementation%20of%20the%20Low%20Power%20Run%20mode%2C%20wherein%20the%20clock%20frequency%20is%20reduced%20to%203MHz%20by%20reducing%20the%20output%20frequency%20of%20the%20FIRC%2C%20and%20disabling%20the%20PLL.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EI've%20tried%20the%20steps%20you've%20mentioned%3CBR%20%2F%3E1.%20AIPS_SLOW_CLK%20and%20LPI2C0_CLK%20and%20successfully%20enabled%20when%20switching%20out%20of%20Low%20Power%20run%20mode%3C%2FP%3E%3CP%3E2.%26nbsp%3BIntCtrl_Ip_DisableIrq%20and%26nbsp%3BIntCtrl_Ip_ClearPending%20are%20called%20right%20before%20the%20mode%20switch%20to%20disable%20and%20clear%20the%20interrupts%20associated%20with%20I2C.%3C%2FP%3E%3CP%3E3.%20I%20could%20not%20find%20the%26nbsp%3B%3CSTRONG%3ELpi2c_Ip_MasterEndTransfer%26nbsp%3B%3C%2FSTRONG%3Efunction%20in%20the%20Lpi2c_Ip%20header%20file.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThe%20problem%20of%20getting%20stuck%20in%20the%20mentioned%20address%20still%20exists.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EDuring%20an%20internal%20discussion%20with%20my%20team%2C%20it%20was%20found%20that%20the%20execution%20was%20stuck%20in%20the%20same%20address%20in%20the%20firmware%20when%20a%20different%20and%20unrelated%20problem%20are%20being%20debugged.%20Is%20it%20possible%20for%20the%20running%20target%20debug%20configuration%20to%20show%20the%20incorrect%20problem%20address%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2199230%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K312%3A%20unknown%20signal%20handler%20taking%20program%20control%20to%20LPI2C%20IRQ%20handler%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2199230%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%2F236613%22%20target%3D%22_blank%22%3E%40himonkoch%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20the%20additional%20information.%20Are%20you%20specifically%20using%26nbsp%3BOption%20E%20-%20Low-Speed%20Run%20mode%20(CORE_CLK%20%40%203%20MHz)%3F%3C%2FP%3E%0A%3CP%3EI%20asume%20you%20are%20getting%20stuck%20at%26nbsp%3B%3CSPAN%3ELpi2c_Ip_ModuleIRQHandler%20because%20LPI2C%20interrupt%20remains%20enabled%20or%20pending%2C%20although%20it%20is%20quite%20hard%20without%20sharing%20configuration%20or%20routine%20to%20test%20it.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EBefore%20switching%20the%20clock%20configuration%2C%20abort%20or%20complete%20any%20pending%20transfer%2C%20you%20can%20use%26nbsp%3BLpi2c_Ip_MasterEndTransfer()%2C%20for%20example.%20Added%20to%20this%2C%20try%20clearing%20and%20disabling%20interrupts%20through%20the%20IntCtrl%20driver%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3C!--ScriptorStartFragment--%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22scriptor-paragraph%22%3E%3CSPAN%3EIntCtrl_Ip_DisableIrq%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3ELPI2C0_Master_Slave_IRQn%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3CSPAN%3E%3B%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%20class%3D%22scriptor-paragraph%22%3E%3CSPAN%3EIntCtrl_Ip_ClearPending%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3ELPI2C0_Master_Slave_IRQn%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3CSPAN%3E%3B%3C!--ScriptorEndFragment--%3E%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%3CLI-WRAPPER%3E%3C%2FLI-WRAPPER%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ELastly%2C%20please%20make%20sure%20that%20AIPS_SLOW_CLK%20and%20LPI2C0_CLK%20are%20both%20enabled%20when%20returning%20from%20VLSR.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EBest%20regards%2C%3CBR%20%2F%3EJuli%C3%A1n%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2198712%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K312%3A%20unknown%20signal%20handler%20taking%20program%20control%20to%20LPI2C%20IRQ%20handler%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2198712%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F200831%22%20target%3D%22_blank%22%3E%40Juli%C3%A1n_Arag%C3%B3nM%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20feature%20does%20not%20utilise%20the%20standby%20power%20mode%20of%20the%20MCU%2C%20rather%20I%20am%20reducing%20the%20power%20consumption%20by%20disabling%20certain%20clocks%2C%20reducing%20the%20overall%20clock%20speed%2C%20and%20disabling%20certain%20pin%20outputs.%3CBR%20%2F%3E%3CBR%20%2F%3EThis%20is%20done%20using%20different%20Clock%20and%20Pin%20functional%20groups%2C%20which%20I%20switch%20between%20to%20obtain%20the%20desired%20output.%3CBR%20%2F%3E%3CBR%20%2F%3EAlso%20before%20this%20transition%2C%20I%20am%20calling%20the%26nbsp%3B%3CSTRONG%3ELpi2c_Ip_MasterDeinit()%3C%2FSTRONG%3E%20function%20to%20disable%20any%20i2c%20involvement.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2198524%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K312%3A%20unknown%20signal%20handler%20taking%20program%20control%20to%20LPI2C%20IRQ%20handler%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2198524%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%2F236613%22%20target%3D%22_blank%22%3E%40himonkoch%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3ECould%20you%20clarify%20what%20routine%20and%20configuration%20you%20are%20using%20when%20saying%20%22%3CSPAN%3EI%20want%20to%20continuously%20change%20the%20pin%20config%20and%20clock%20config%20for%20power%20saving%20feature.%22%3F%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EAre%20you%20going%20to%20standby%20and%20waking%20up%20repeatedly%3F%20Have%20you%20referred%20to%20any%20of%20the%20low%20power%20examples%20for%20S32K3%3F%26nbsp%3B%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%3ES32K3%20Low%20Power%20Management%20AN%20and%20demos%20-%20NXP%20Community%3C%2FA%3E%26nbsp%3B%26amp%3B%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FRTD400-amp-500-MCAL-amp-IP-S32K3-Low-Power-Management-AN-and%2Fta-p%2F1993152%22%20target%3D%22_blank%22%3E%5BRTD400%20%26amp%3B%20500%20MCAL%20%26amp%3B%20IP%5D%20S32K3%20Low%20Power%20Management%20AN%20and%20demos%20-%20NXP%20Community%3C%2FA%3E.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EAlso%2C%20before%20going%20to%20standby%2C%20are%20you%20de-initializing%20I2C%20instance%3F%3C!--ScriptorEndFragment--%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3ELpi2c_Ip_MasterDeinit(instance)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EPlease%20share%20any%20relevant%20configuration%20or%20code%20snippet.%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3CBR%20%2F%3EJuli%C3%A1n%3C%2FP%3E%3C%2FLINGO-BODY%3E