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.
Solved! Go to Solution.
Hi @GGbong,
You use an old version of the RM.
SWD is supported on S32K116.
Can you please contact Lauterbach support?
Regards,
Daniel
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.
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
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
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
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
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 port1 | |
S32K142 | Yes | Yes | Yes | No |
S32K146 | Yes | Yes | Yes | No |
S32K144 | Yes | Yes | Yes | No |
S32K148 | Yes | Yes | Yes | Yes |
from < S32K1xx Series Reference Manual> Document Number: S32K1XXRM
Rev. 4, 06/2017
Thanks,
BR, GGbong
Hi @GGbong,
You use an old version of the RM.
SWD is supported on S32K116.
Can you please contact Lauterbach support?
Regards,
Daniel
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
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