Using trace32 debugging S32K116's issue

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

Using trace32 debugging S32K116's issue

Jump to solution
1,603 Views
GGbong
Contributor II

Hi,

    When I was debugging the S32K116 using trace32, the RCM_SRS's value always shows SW:

10
SW
Software
Indicates a reset has been caused by software setting of SYSRESETREQ bit in Application Interrupt and
Reset Control Register in the ARM core.
0 Reset not caused by software setting of SYSRESETREQ bit
1 Reset caused by software setting of SYSRESETREQ bit

even if I turn it off and power S32K116 back on. The debug interface is SWD. Can anyone answer this question?

Thanks in advance.

Tags (2)
0 Kudos
1 Solution
1,018 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @GGbong,

You use an old version of the RM.

SWD is supported on S32K116.

danielmartynek_0-1696923555168.png

Can you please contact Lauterbach support?

 

Regards,

Daniel

 

View solution in original post

0 Kudos
10 Replies
1,552 Views
GGbong
Contributor II

Hi,Daniel,

      My question is not that, in fact I want a RCM_SRS's value that wasn't SW. But no matter what I do, the reset type always shows SW.  

0 Kudos
1,489 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @GGbong,

Either the application writes the S32_SCB->AIRCR with 0x05FA0004 or the .cmm script that you use to program / attach the debugger writes it.

Can you go through the .cmm script?

You can set a watchpoint on that register.

 

Regards,

Daniel

0 Kudos
1,426 Views
GGbong
Contributor II

Hi. Daniel,

    I ‘ve done what you see, and I found the value of SCB->AIRCR is 0x05FA0000(default). This is my .cmm script, and the screenshot when I run at line 53. Can you see anything?

 

BR

GGbong

0 Kudos
1,346 Views
danielmartynek
NXP TechSupport
NXP TechSupport

HI @GGbong,

No, I don't see anything in the screenshots.

The register will always read 0x05FA0000.

When the register is written with the 0x05FA0004 value, the MCU gets reset immediately.

Can you try running a simple script like this:

SYStem.RESet
SYStem.CPU S32k116
SYStem.UP

DO ~~/demo/arm/flash/s32k CPU=S32K116 PREPAREONLY

FLASH.ReProgram ALL /Erase
DATA.LOAD.ELF "*.elf"
FLASH.ReProgram off

data.list
GO main
WAIT !RUN()

ENDDO

And use an .elf file from an SDK / RTD example.

 

Thanks,

BR, Daniel

0 Kudos
1,051 Views
GGbong
Contributor II

Hi Daniel,

    I did what you said, but it still the same, the RCM_SRS's value always show 0x00000400. The .elf file from "T32\demo\arm\hardware\s32k\s32k116\sieve_ram_thumb_v6m.elf".

    Besides, I think the SW is OK. My question is the RCM_SRS only shows 0x00000400(SW),even if I power it down and power it  back on

0 Kudos
1,043 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @GGbong,

After Power-on reset, RCM_SRS = 0x82.

Once you plug the board again, monitor the reset_b pin just to make sure the MCU does not reset itself while running stand-alone.

Can you use UART or GPIOs or any other interface except JTAG/SWD to read the RCM_SRS register?

 

Thanks,

BR, Daniel

Tags (1)
0 Kudos
1,021 Views
GGbong
Contributor II

Hi Daniel,

     I can't use other interface to read the register. There only S32Desing Studio and Trace 32

     Besides, when I use S32DS to debugging the S32K116, the RCM_SRS value is correct, but if use the Trace32, it only shows 0x400. The trace32''s interface is SWD, and in S32DS, interface is PE micro.

      By the way, I read in the manual that the S32K116 is not supported SWD or JTAG, will this have any impact?

 

  Table 53-1. Supported debug interfaces

Chip Supported debug interfaces
IEEE 1149.1 JTAG Serial Wire
Debug(SWD)
SWO 4-pin parallel trace
port
1
S32K142 Yes Yes Yes No
S32K146 Yes Yes Yes No
S32K144 Yes Yes Yes No
S32K148 Yes Yes Yes Yes

 

from < S32K1xx Series Reference ManualDocument Number: S32K1XXRM
Rev. 4, 06/2017

 

Thanks,

BR, GGbong

0 Kudos
1,019 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @GGbong,

You use an old version of the RM.

SWD is supported on S32K116.

danielmartynek_0-1696923555168.png

Can you please contact Lauterbach support?

 

Regards,

Daniel

 

0 Kudos
1,562 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @GGbong,

There must be a write to the AIRCR[SYSRESETREQ] register in the application.

S32_SCB->AIRCR = 0x05FA0004;

What project are you debugging?

 

BR, Daniel

0 Kudos
1,545 Views
GGbong
Contributor II

HI. Daniel,


That's not what I meant. In fact, I want another RCM_SRS value that wasn't SW. But no matter what I do, the reset type always shows SW.


BR,GGbong

0 Kudos