Trouble connecting to S32K342 (reset loop)

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

Trouble connecting to S32K342 (reset loop)

668 Views
S1mp1e
Contributor I

Hi all,

I’m running into some trouble with an S32K342 MCU and J-Link.

When I try to connect, I get this error:

Error: DAP error while reading AIRCR

On normal power-up, the RESET pin keeps toggling high/low, looks like the device is stuck in some kind of reset loop.

If I force the RESET pin high externally, J-Link can connect.

But when I try a full chip erase (erase in J-Link Commander), it successed. After reconnecting, I’m back to the same error and reset pin instability.

Could this be caused by flash security configuration locking the device? If so, what’s the proper recovery procedure?

What’s the likely root cause of the RESET pin toggling — external hardware issue or some internal fault/reset source?

I am looking for guidance on the official recovery/unlock procedure for S32K342 and tips on how to diagnose or fix the RESET pin instability.

Thanks in advance for any insights!

Tags (1)
0 Kudos
Reply
1 Reply

613 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @S1mp1e,

Have you tried both JTAG and SWD?

Do you see the same error?

What is the duration between each RESET assertion?
How many reset pulses do you observe?

The S32K3 family has a safety feature where repeated functional resets escalate to a destructive reset, eventually entering Recovery Mode. If the reset counter exceeds a threshold (default is 8), the device stays in reset until a power cycle clears it.

Also, when there is no valid Image Vector Table (IVT) (e.g., flash erased), the Secure Boot Assist Firmware (SBAF) automatically starts the Recovery Mode sequence.

What is the current Lifecycle (LC) state of the device?
Is HSE firmware installed on the MCU?

danielmartynek_0-1762770444471.png

danielmartynek_1-1762770512198.png

 

If an application is loaded, the reset could be triggered by multiple sources. To identify the cause, you should read the MC_RGM_DES (Destructive Event Status) and MC_RGM_FES (Functional Event Status) registers.

 

Regards,

Daniel

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2201437%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ETrouble%20connecting%20to%20S32K342%20(reset%20loop)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2201437%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20all%2C%3C%2FP%3E%3CP%3EI%E2%80%99m%20running%20into%20some%20trouble%20with%20an%20S32K342%20MCU%20and%20J-Link.%3C%2FP%3E%3CP%3EWhen%20I%20try%20to%20connect%2C%20I%20get%20this%20error%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EError%3A%20DAP%20error%20while%20reading%20AIRCR%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EOn%20%3CSTRONG%3Enormal%20power-up%3C%2FSTRONG%3E%2C%20the%20RESET%20pin%20%3CSTRONG%3Ekeeps%20toggling%20high%2Flow%3C%2FSTRONG%3E%2C%20looks%20like%20the%20device%20is%20stuck%20in%20some%20kind%20of%20reset%20loop.%3C%2FP%3E%3CP%3EIf%20I%20%3CSTRONG%3Eforce%20the%20RESET%20pin%20high%20externally%3C%2FSTRONG%3E%2C%20J-Link%20can%20%3CSTRONG%3Econnect%3C%2FSTRONG%3E.%3C%2FP%3E%3CP%3EBut%20when%20I%20try%20a%20full%20chip%20erase%20(erase%20in%20J-Link%20Commander)%2C%20%3CSTRONG%3Eit%20successed%3C%2FSTRONG%3E.%20After%20reconnecting%2C%20I%E2%80%99m%20back%20to%20the%20same%20error%20and%20reset%20pin%20instability.%3C%2FP%3E%3CP%3ECould%20this%20be%20caused%20by%20flash%20security%20configuration%20locking%20the%20device%3F%20If%20so%2C%20what%E2%80%99s%20the%20proper%20recovery%20procedure%3F%3C%2FP%3E%3CP%3EWhat%E2%80%99s%20the%20likely%20root%20cause%20of%20the%20RESET%20pin%20toggling%20%E2%80%94%20external%20hardware%20issue%20or%20some%20internal%20fault%2Freset%20source%3F%3C%2FP%3E%3CP%3EI%20am%20looking%20for%20guidance%20on%20the%20official%20recovery%2Funlock%20procedure%20for%20S32K342%20and%20tips%20on%20how%20to%20diagnose%20or%20fix%20the%20RESET%20pin%20instability.%3C%2FP%3E%3CP%3EThanks%20in%20advance%20for%20any%20insights!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2201794%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Trouble%20connecting%20to%20S32K342%20(reset%20loop)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2201794%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%2F256692%22%20target%3D%22_blank%22%3E%40S1mp1e%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EHave%20you%20tried%20both%20JTAG%20and%20SWD%3F%3C%2FP%3E%0A%3CP%3EDo%20you%20see%20the%20same%20error%3F%3C%2FP%3E%0A%3CP%3EWhat%20is%20the%20duration%20between%20each%20RESET%20assertion%3F%3CBR%20%2F%3EHow%20many%20reset%20pulses%20do%20you%20observe%3F%3C%2FP%3E%0A%3CP%3EThe%20S32K3%20family%20has%20a%20safety%20feature%20where%20repeated%20functional%20resets%20escalate%20to%20a%20destructive%20reset%2C%20eventually%20entering%20Recovery%20Mode.%20If%20the%20reset%20counter%20exceeds%20a%20threshold%20(default%20is%208)%2C%20the%20device%20stays%20in%20reset%20until%20a%20power%20cycle%20clears%20it.%3C%2FP%3E%0A%3CP%3EAlso%2C%26nbsp%3Bwhen%20there%20is%20no%20valid%20Image%20Vector%20Table%20(IVT)%20(e.g.%2C%20flash%20erased)%2C%20the%20Secure%20Boot%20Assist%20Firmware%20(SBAF)%20automatically%20starts%20the%20Recovery%20Mode%20sequence.%3C%2FP%3E%0A%3CP%3EWhat%20is%20the%20current%20Lifecycle%20(LC)%20state%20of%20the%20device%3F%3CBR%20%2F%3EIs%20HSE%20firmware%20installed%20on%20the%20MCU%3F%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22danielmartynek_0-1762770444471.png%22%20style%3D%22width%3A%20701px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22danielmartynek_0-1762770444471.png%22%20style%3D%22width%3A%20701px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F364683i89F612B9EFE9E7F9%2Fimage-dimensions%2F701x256%3Fv%3Dv2%22%20width%3D%22701%22%20height%3D%22256%22%20role%3D%22button%22%20title%3D%22danielmartynek_0-1762770444471.png%22%20alt%3D%22danielmartynek_0-1762770444471.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22danielmartynek_1-1762770512198.png%22%20style%3D%22width%3A%20845px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22danielmartynek_1-1762770512198.png%22%20style%3D%22width%3A%20845px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F364684i98D5EB502DD96851%2Fimage-dimensions%2F845x651%3Fv%3Dv2%22%20width%3D%22845%22%20height%3D%22651%22%20role%3D%22button%22%20title%3D%22danielmartynek_1-1762770512198.png%22%20alt%3D%22danielmartynek_1-1762770512198.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EIf%20an%20application%20is%20loaded%2C%20the%20reset%20could%20be%20triggered%20by%20multiple%20sources.%20To%20identify%20the%20cause%2C%20you%20should%20read%20the%20MC_RGM_DES%20(Destructive%20Event%20Status)%20and%20MC_RGM_FES%20(Functional%20Event%20Status)%20registers.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3EDaniel%3C%2FP%3E%3C%2FLINGO-BODY%3E