S32K142W LQFP48 crashes when using Segger Jlink debugger

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

S32K142W LQFP48 crashes when using Segger Jlink debugger

3,936 Views
timwhite
Contributor III

Hello,

I am using  the NXP S32K142W LQFP48  (yes 48 pin ) which crashes when using Segger Jlink debugger. The code compiles fine and isn't the suspected problem because the issue manifests itself differently when I change anything in the firmware. (it crashes at different places). This code runs on an S32K142 Eval board as well.

In the IDE, when configuring the debugger, it doesn't allow the selection of the S32K142W component, but does allow S32K142 .  Is there a difference that could be causing my problem and if so when will you supply the device type selection for the S32K142W device?

timwhite_0-1670103043906.png

 

 

 

 

0 Kudos
Reply
12 Replies

3,898 Views
timwhite
Contributor III

 

I guessed that would be your first response so I have already completely rebuilt  the project from within the IDE using S32DS 3.4 and SDK 4.03.

After doing all that I get the same sort of issues. I  think my issue is not with the firmware but rather with my JLINK debugger interface. I am using Segger Jlink interfaces(two different varieties exhibiting the same issues). I note that the Segger website doesn't confirm connectivity with the S32K142W part.  We are migrating firmware from your Evaluation Board to our production unit and we use the SWD interface. Do you have a suggested programming / debugging interface that is know to work with the S32K142W_LQFP48 component?

 

Segger's components:

timwhite_2-1670248817797.png

SDK

timwhite_0-1670247992686.png

S32DS 

timwhite_1-1670248061261.png

 

Project creation path used:

timwhite_3-1670249649129.png

 

0 Kudos
Reply

3,880 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

I don't have S32K142W chip on hand, so test it on S32K14WEVB-Q064 board(S32K144W_LQFP64). I am able to debug S32K144W when Device name input S32K144. Would you please import SDK example of S32K142W, and then input S32K142 as Device name?

Executable: ${S32DS_ARM32_TOOLCHAIN_DIR}/bin/${arm32_cross_prefix}gdb${arm32_cross_suffix}

Debugger Configurations.png

I am using external SEGGER J-Link 10. Have you install the latest J-Link software?(You can consult SEGGER to confirm whether it supports S32K142W)J-Link debug S32K144W select S32K144.png

0 Kudos
Reply

3,845 Views
timwhite
Contributor III

Hello again,

I have determined that the interrupt vector table isn't getting loaded when executing the debugger (the remaining portion of the code is getting programmed properly). I know this because I can make everything work properly if I use an external executable to program the device from a hex file that I generated while compiling. If I preprogram the part and then get back into the debugger, all is fine.

Attached is my console output showing the Jlink messages during a connection activity. I haven't found anything suspicious there. 

I have NOT modified the standard (project).ld  file in case anyone asks.

 

 

 

0 Kudos
Reply

3,842 Views
timwhite
Contributor III

also.. the watchdog is NOT  initialized, or otherwise enabled.

 

timwhite_0-1670538650520.png

 

0 Kudos
Reply

3,844 Views
timwhite
Contributor III

This is how the debugger is set up.

timwhite_1-1670538058269.png

 

 

timwhite_0-1670538025141.png

 

0 Kudos
Reply

3,871 Views
timwhite
Contributor III

The S32DS version I was using was 3.4 and I had S32DK S32K1XX RTM 4.0.3 installed.

timwhite_0-1670363602066.png

 

I also downloaded the newer S32K 3.5 but interestingly it only shows S32DK S32K1X RTM 4.0.1

timwhite_0-1670363838498.png

 

Which should I be using or does it matter?

 

0 Kudos
Reply

3,865 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Currently, users who develop S32K1 please use S32DS 3.4. I can see that the S32K1 RTD and SDK are both installed. Have you tried to test the RTD and SDK example?(File->New->S32DS Project from Example)

Please show me the screenshot of crashes.

Please ensure the debug interface is correct by refer to the "Table 8. S32K1xx - JTAG and SWD interface" of AN5426: Hardware Design Guidelines for S32K1xx – Application Note

Table 8. S32K1xx - JTAG and SWD interface.png

If still not work, please input connect command and select SWD in SEGGER J-Link Commander. Then show me the values of MDM-AP status and control registers by refer to: Unbricking S32K146

0 Kudos
Reply

3,907 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi timwhite,

Please download the S32DS v3.4 and install the S32 SDK for S32K1xx RTM 4.0.2. S32K142W and S32K144W is in the support list of it. Do not develop S32K14xW with old S32DS and SDK, there are some difference between S32K142 and S32K142W which may cause hardfault and crash.


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

3,801 Views
timwhite
Contributor III

I purchased one of the S32K144W eval boards and brought it up successfully with the built in Open SDA with the hello world application from the library.

I then provisioned it for the JLINK interface and attempted to program it that way. This was a big mistke. During the process, there was an error message that seemed to indicate the security bytes were not correct and the chip would be erased. 

Now the board is bricked. Jlink will not communicate, nor will the Open SDA interface.The eval board has a constant red light at the open sda interface.

 

The moral of the story thus far is to use my S32K142 Eval board for testing and only use JLINK for programming the actual PCB with the S32K142W version. 

0 Kudos
Reply

3,793 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Please check if you can recover the S32K144W eval board by refer to Open SDA P&E Error

0 Kudos
Reply

3,897 Views
timwhite
Contributor III

See post above, I think I misplaced my reply but I have already done as you suggest.

https://community.nxp.com/t5/S32K/S32K142W-LQFP48-crashes-when-using-Segger-Jlink-debugger/m-p/15644...

0 Kudos
Reply

3,917 Views
Guofred
Contributor III

Hi @timwhite ,

May be you can download this code on the Demo board to verify, i recommend using the S32DS.ARM.2.2 to check it again. thanks.

Guofred_0-1670156082351.png

Best regards

Guofred

0 Kudos
Reply