S32K312 EVB DEBUG

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

S32K312 EVB DEBUG

2,685 Views
PINKMAN
Contributor III
Hello:
I made a really stupid mistake. I configured the debug port of the S32K31XEVB-Q100 as a regular GPIO, which now prevents me from downloading programs via the debug port. Could you please tell me if there are any solutions to this problem?

 

As an addition, I am using an external debugger instead of the on-board OPEN-SDA.
0 Kudos
Reply
9 Replies

2,660 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @PINKMAN,

To ensure successful debugging, the MCU must be reset and the debugger must connect and halt the core within the brief time window before the pins are reconfigured.

Did you also reconfigure the reset_b pin?

If so, the only reliable way to reset the MCU is via a Power-On Reset (POR).

What debugger are you using?

For example, if you're using Lauterbach, you can use a script like this:

SYStem.CPU S32K312-M7
SYStem.config.core 1. 1.
SYStem.config.debugporttype JTAG
System.JTAGclock 10MHz
sys.Option DUALPORT ON
wait state.power()
sys.up
if RUN()
break

It waits until the MCU is powered.

 

Regards,

Daniel

 

 

0 Kudos
Reply

2,656 Views
PINKMAN
Contributor III

I only configured PTA4 (JTAG_TMS_SWD_DIO) as CMP_OUT and did not configure other debugging pins. The debugger we use is JLINK. Could you please tell me if there is any way to solve this problem?

0 Kudos
Reply

2,647 Views
danielmartynek
NXP TechSupport
NXP TechSupport
0 Kudos
Reply

2,622 Views
PINKMAN
Contributor III

PINKMAN_0-1758079038086.png

according your suggestion, it not works, the picture is my step,can you tell me what happened.  my debug is SWD mode,thanks

0 Kudos
Reply

2,613 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Can you try JTAG protocol too?

 

Thank you

0 Kudos
Reply

2,608 Views
PINKMAN
Contributor III

can you configured PTA4 (JTAG_TMS_SWD_DIO) as CMP_OUT if you have a S32K31XEVB-Q100,and try to unlock it use jlink command

0 Kudos
Reply

2,460 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @PINKMAN,

I contacted SEGGER support, and they confirmed that there is a bug in the algorithm.
They are currently working on a fix. Once it's available, I will update the thread accordingly.

 

Regards,

Daniel

 

0 Kudos
Reply

1,914 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @PINKMAN,

Segger has fixed the issue, the change will be included in version V8.88, scheduled to be released on November 12th.

 

Regards,

Daniel

0 Kudos
Reply

2,610 Views
PINKMAN
Contributor III

i try all of the two mode ,still not work

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2170131%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K312%20EVB%20DEBUG%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2170131%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CDIV%20class%3D%22%22%3EHello%3A%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3EI%20made%20a%20really%20stupid%20mistake.%20I%20configured%20the%20debug%20port%20of%20the%20S32K31XEVB-Q100%20as%20a%20regular%20GPIO%2C%20which%20now%20prevents%20me%20from%20downloading%20programs%20via%20the%20debug%20port.%20Could%20you%20please%20tell%20me%20if%20there%20are%20any%20solutions%20to%20this%20problem%3F%3C%2FDIV%3E%3CBR%20%2F%3E%3CDIV%20class%3D%22%22%3EAs%20an%20addition%2C%20I%20am%20using%20an%20external%20debugger%20instead%20of%20the%20on-board%20OPEN-SDA.%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2200057%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K312%20EVB%20DEBUG%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2200057%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%2F193092%22%20target%3D%22_blank%22%3E%40PINKMAN%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3ESegger%20has%20fixed%20the%20issue%2C%20the%20change%20will%20be%20included%20in%20version%20V8.88%2C%20scheduled%20to%20be%20released%20on%20November%2012th.%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%3CLINGO-SUB%20id%3D%22lingo-sub-2173275%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K312%20EVB%20DEBUG%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2173275%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%2F193092%22%20target%3D%22_blank%22%3E%40PINKMAN%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EI%20contacted%20SEGGER%20support%2C%20and%20they%20confirmed%20that%20there%20is%20a%20bug%20in%20the%20algorithm.%3CBR%20%2F%3EThey%20are%20currently%20working%20on%20a%20fix.%20Once%20it's%20available%2C%20I%20will%20update%20the%20thread%20accordingly.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3EDaniel%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2170948%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K312%20EVB%20DEBUG%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2170948%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3Ecan%20you%20configured%20PTA4%20(JTAG_TMS_SWD_DIO)%20as%20CMP_OUT%20if%20you%20have%20a%20S32K31XEVB-Q100%2Cand%20try%20to%20unlock%20it%20use%20jlink%20command%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2170932%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K312%20EVB%20DEBUG%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2170932%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ei%20try%20all%20of%20the%20two%20mode%20%2Cstill%20not%20work%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2170846%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K312%20EVB%20DEBUG%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2170846%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ECan%20you%20try%20JTAG%20protocol%20too%3F%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThank%20you%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2170768%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K312%20EVB%20DEBUG%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2170768%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22PINKMAN_0-1758079038086.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22PINKMAN_0-1758079038086.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F357221i7542CF1AEF22EC10%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22PINKMAN_0-1758079038086.png%22%20alt%3D%22PINKMAN_0-1758079038086.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3Eaccording%20your%20suggestion%2C%20it%20not%20works%2C%20the%20picture%20is%20my%20step%2Ccan%20you%20tell%20me%20what%20happened.%26nbsp%3B%20my%20debug%20is%20SWD%20mode%2Cthanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2170322%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K312%20EVB%20DEBUG%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2170322%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ECan%20you%20try%20this%20solution%3F%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32-SDK%2Ffailed-to-power-up-dap-after-program-s32k312-with-pll0-equal%2Ftd-p%2F1609010%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32-SDK%2Ffailed-to-power-up-dap-after-program-s32k312-with-pll0-equal%2Ftd-p%2F1609010%3C%2FA%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThank%20you%2C%3C%2FP%3E%0A%3CP%3EBR%2C%20Daniel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2170306%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K312%20EVB%20DEBUG%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2170306%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3EI%20only%20configured%20PTA4%20(JTAG_TMS_SWD_DIO)%20as%20CMP_OUT%20and%20did%20not%20configure%20other%20debugging%20pins.%20The%20debugger%20we%20use%20is%20JLINK.%20Could%20you%20please%20tell%20me%20if%20there%20is%20any%20way%20to%20solve%20this%20problem%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2170279%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K312%20EVB%20DEBUG%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2170279%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%2F193092%22%20target%3D%22_blank%22%3E%40PINKMAN%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3ETo%20ensure%20successful%20debugging%2C%20the%20MCU%20must%20be%20reset%20and%20the%20debugger%20must%20connect%20and%20halt%20the%20core%20within%20the%20brief%20time%20window%20before%20the%20pins%20are%20reconfigured.%3C%2FP%3E%0A%3CP%3EDid%20you%20also%20reconfigure%20the%20reset_b%20pin%3F%3C%2FP%3E%0A%3CP%3EIf%20so%2C%20the%20only%20reliable%20way%20to%20reset%20the%20MCU%20is%20via%20a%20Power-On%20Reset%20(POR).%3C%2FP%3E%0A%3CP%3EWhat%20debugger%20are%20you%20using%3F%3C%2FP%3E%0A%3CP%3EFor%20example%2C%20if%20you're%20using%20Lauterbach%2C%20you%20can%20use%20a%20script%20like%20this%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-javascript%22%3E%3CCODE%3ESYStem.CPU%20S32K312-M7%0ASYStem.config.core%201.%201.%0ASYStem.config.debugporttype%20JTAG%0ASystem.JTAGclock%2010MHz%0Asys.Option%20DUALPORT%20ON%0Await%20state.power()%0Asys.up%0Aif%20RUN()%0Abreak%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EIt%20waits%20until%20the%20MCU%20is%20powered.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3EDaniel%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E