1.The s32k344 routine burned to s32k314 could not pass JTAG online simulation. An error was reported when new project S32K314 was selected. The usage library information is as follows: Autosar Version: 4.7.0
* Autosar Revision : ASR_REL_4_7_REV_0000
* Autosar Conf.Variant :
* SW Version: 3.0.0
* Build Version : S32K3_RTD_3_0_0_D2303_ASR_REL_4_7_REV_0000_20230331
2.When debug_ram is used, jtag can be used. When Debug_flash is selected, jtag cannot be emulated, and the following error occurs:
Reading 64 bytes @ address 0x00400DC0
Read 4 bytes @ address 0x00400E2C (Data = 0x40291700)
Read 4 bytes @ address 0x00400E2C (Data = 0x40291700)
Read 2 bytes @ address 0x00400DFC (Data = 0x4C0B)
Received monitor command: clrbp
Received monitor command: reset
Resetting target
Received monitor command: halt
Halting target CPU...
...Target halted (PC = 0x20000004)
Downloading 16208 bytes @ address 0x00400000 - Verified OK
Downloading 7556 bytes @ address 0x00403F50 - Verified OK
Downloading 152 bytes @ address 0x00405CD4 - Verified OK
Downloading 4 bytes @ address 0x00405D6C - Verified OK
Writing register 'pc' = 0x00400C20
Comparing flash [....................] Done.
Reading 64 bytes @ address 0x00400DC0
Read 4 bytes @ address 0x00400E2C (Data = 0x40291700)
Read 4 bytes @ address 0x00400E2C (Data = 0x40291700)
Read 2 bytes @ address 0x00400DFC (Data = 0x4C0B)
Read 4 bytes @ address 0x00400E2C (Data = 0x40291700)
Read 4 bytes @ address 0x00400E2C (Data = 0x40291700)
Read 2 bytes @ address 0x00400DFC (Data = 0x4C0B)
Received monitor command: regs
R0 = 000F7B73, R1 = 00000000, R2 = DEADBEEF, R3 = E000E000
R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000
R8 = 00000000, R9 = 00000000, R10= 00000000, R11= 00000000
R12= 00000000, R13= 20010000, MSP= 20010000, PSP= 00000000
R14(LR) = 2040017D, R15(PC) = 00400C20
XPSR 01000003, APSR 00000000, EPSR 01000000, IPSR 00000003
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Security extension regs:
MSP_S = 00000000, MSPLIM_S = 00000000
PSP_S = 00000000, PSPLIM_S = 00000000
MSP_NS = 20010000, MSPLIM_NS = 00000000
PSP_NS = 00000000, PSPLIM_NS = 00000000
CONTROL_S 00, FAULTMASK_S 00, BASEPRI_S 00, PRIMASK_S 00
CONTROL_NS 00, FAULTMASK_NS 00, BASEPRI_NS 00, PRIMASK_NS 00
Reading common registers: Read register 'r0' (4 bytes) from hardware: 0x737B0F00
Read register 'r1' (4 bytes) from hardware: 0x00000000
Read register 'r2' (4 bytes) from hardware: 0xEFBEADDE
Read register 'r3' (4 bytes) from hardware: 0x00E000E0
Read register 'r4' (4 bytes) from hardware: 0x00000000
Read register 'r5' (4 bytes) from hardware: 0x00000000
Read register 'r6' (4 bytes) from hardware: 0x00000000
Read register 'r7' (4 bytes) from hardware: 0x00000000
Read register 'r8' (4 bytes) from hardware: 0x00000000
Read register 'r9' (4 bytes) from hardware: 0x00000000
Read register 'r10' (4 bytes) from hardware: 0x00000000
Read register 'r11' (4 bytes) from hardware: 0x00000000
Read register 'r12' (4 bytes) from hardware: 0x00000000
Read register 'sp' (4 bytes) from hardware: 0x00000120
Read register 'lr' (4 bytes) from hardware: 0x7D014020
Read register 'pc' (4 bytes) from hardware: 0x200C4000
Read register 'xpsr' (4 bytes) from hardware: 0x03000001
Setting breakpoint @ address 0x00400DFC, Kind = 2, Type = THUMB, BPHandle = 0x0003
Starting target CPU...
...Target halted (DBGRQ, PC = 0x00400C20)
Reading common registers: Read register 'r0' (4 bytes) from hardware: 0x737B0F00
Read register 'r1' (4 bytes) from hardware: 0x00000000
Read register 'r2' (4 bytes) from hardware: 0xEFBEADDE
Read register 'r3' (4 bytes) from hardware: 0x00E000E0
Read register 'r4' (4 bytes) from hardware: 0x00000000
Read register 'r5' (4 bytes) from hardware: 0x00000000
Read register 'r6' (4 bytes) from hardware: 0x00000000
Read register 'r7' (4 bytes) from hardware: 0x00000000
Read register 'r8' (4 bytes) from hardware: 0x00000000
Read register 'r9' (4 bytes) from hardware: 0x00000000
Read register 'r10' (4 bytes) from hardware: 0x00000000
Read register 'r11' (4 bytes) from hardware: 0x00000000
Read register 'r12' (4 bytes) from hardware: 0x00000000
Read register 'sp' (4 bytes) from hardware: 0x00000120
Read register 'lr' (4 bytes) from hardware: 0x7D014020
Read register 'pc' (4 bytes) from hardware: 0x200C4000
Read register 'xpsr' (4 bytes) from hardware: 0x03000001
Removing breakpoint @ address 0x00400DFC, Size = 2
Read 4 bytes @ address 0x00400C20 (Data = 0xF04FB672)
Read 2 bytes @ address 0x00400C20 (Data = 0xB672)
Reading 64 bytes @ address 0x00400C00
Reading 64 bytes @ address 0x00400C40
Reading 64 bytes @ address 0x00400C80
Setting breakpoint @ address 0x00400DFC, Kind = 2, Type = THUMB, BPHandle = 0x0004
Starting target CPU...
...Target halted (DBGRQ, PC = 0x00400C20)
Reading common registers: Read register 'r0' (4 bytes) from hardware: 0x737B0F00
Read register 'r1' (4 bytes) from hardware: 0x00000000
Read register 'r2' (4 bytes) from hardware: 0xEFBEADDE
Read register 'r3' (4 bytes) from hardware: 0x00E000E0
Read register 'r4' (4 bytes) from hardware: 0x00000000
Read register 'r5' (4 bytes) from hardware: 0x00000000
Read register 'r6' (4 bytes) from hardware: 0x00000000
Read register 'r7' (4 bytes) from hardware: 0x00000000
Read register 'r8' (4 bytes) from hardware: 0x00000000
Read register 'r9' (4 bytes) from hardware: 0x00000000
Read register 'r10' (4 bytes) from hardware: 0x00000000
Read register 'r11' (4 bytes) from hardware: 0x00000000
Read register 'r12' (4 bytes) from hardware: 0x00000000
Read register 'sp' (4 bytes) from hardware: 0x00000120
Read register 'lr' (4 bytes) from hardware: 0x7D014020
Read register 'pc' (4 bytes) from hardware: 0x200C4000
Read register 'xpsr' (4 bytes) from hardware: 0x03000001
Removing breakpoint @ address 0x00400DFC, Size = 2
Read 4 bytes @ address 0x00400C20 (Data = 0xF04FB672)
Read 2 bytes @ address 0x00400C20 (Data = 0xB672)
jtag will stop here, and when you hit Run, the assembler will still stop.
.set VTOR_REG, 0xE000ED08
.thumb
.thumb_func
.globl Reset_Handler
.globl _start
_start:
Reset_Handler:
/*****************************************************/
/* Skip normal entry point as nothing is initialized */
/*****************************************************/
cpsid i
mov r0, #0
mov r1, #0
mov r2, #0
mov r3, #0
The program is running in startup_cm7.s file “cpsid i” and cannot continue execution.
The log you provided indicates that there are issues with the JTAG online simulation and debugging process on your S32K314 microcontroller. While the specific reasons for the error may not be immediately evident from the log, there are a few common reasons why you might encounter issues with JTAG debugging:
1. **Flash Configuration:** MyLabCorp
One possible reason for the JTAG debugging issue could be related to the flash configuration of your microcontroller. Make sure that the flash memory is properly configured and accessible for debugging.
2. **JTAG Connection:**
Ensure that the JTAG connection between the debugger and the S32K314 microcontroller is properly established and functional. Check for any loose connections or issues with the JTAG hardware.
3. **Reset and Clock Configuration:**
Verify that the reset and clock configurations of the microcontroller are set correctly. Incorrect clock configurations can lead to unpredictable behavior during debugging.
4. **Microcontroller Setup:**
Double-check your microcontroller setup and the initialization code. Ensure that the microcontroller is configured correctly and that the necessary peripheral modules are initialized properly.
5. **JTAG Debugging Settings:**
Review the debugging settings in your development environment or IDE. Make sure that the correct debugging options are selected and that the JTAG debugging mode is enabled.
6. **Compiler or Debugger Settings:**
Check your compiler and debugger settings to ensure they are compatible with the S32K314 microcontroller. Verify that the debugger settings match the hardware configuration.
7. **Hardware Issues:**
In some cases, hardware issues, such as power supply problems or signal integrity issues, can affect JTAG debugging. Double-check your hardware setup and consider testing with a different debugger or hardware setup if possible.
As the log suggests that the program execution stops at "cpsid i" in the "startup_cm7.s" file, it may be related to the interrupt handling or low-power mode configuration in the microcontroller. Review your interrupt and power management settings to ensure they are set correctly.
It's important to note that debugging complex issues like this often require a detailed understanding of the hardware, software, and the development environment being used. If you are unable to identify the root cause or resolve the issue using the steps mentioned above, I recommend reaching out to the official support channels of the microcontroller manufacturer or your development tool provider for further assistance. They can provide specialized guidance and support tailored to your specific hardware and software setup.
Hi @Lita,
When you hit RUN at cpsid i, does the MCU get reset? Can you monitor the reset_b pin?
If so, what is the content of the MC_RGM[FES, DES] registers?
Is the HSE_FW installed?
Thank you,
BR, Daniel
Do you have any other debugger?
If you have a SEGGER probe, can you use the j-link commands to erase the MCU while it is in reset?
BR, Daniel
Hi @Lita,
This has been discussed already in these threads:
https://community.nxp.com/t5/S32K/No-more-debug-connection-after-Port-Cfg/m-p/1650308
https://community.nxp.com/t5/S32K/S32K344-RTD-PORT-DIO-and-Debugging/m-p/1693264
Regards,
Daniel