The MCU cannot be accessed via JTAG

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

The MCU cannot be accessed via JTAG

Jump to solution
1,557 Views
MarkShen__
Contributor II

Hello,

The program got stuck during the bootloader-based firmware upgrade, and then an attempt was made to reflash the program via JTAG, but the MCU cannot be accessed through JTAG.

Debugger: PE micro multilink universal
IDE: S32DS

Could you offer some clues about this problem?


Here are the error messages:

Loading programming algorithm ...

Done.

Programming sequency is : erase, blank check, program, and verify {default}

CMD>VC

Verifying object file CRC-16 to device ranges ...

block 00400000-00429AB3 ...

 

Error! CRC Command Timed Out

Current content of flash does not match application to be programmed

CMD>EM

Command is inactive for this .ARP file.

Error Erasing flash of device

Error occured during Flash programming.

INFO: DAP IDCODE = 0x6BA02477

INFO: DAP successfully powered up. DP CTRL/STAT = 0xF0000000

 

Starting reset script (C:\NXP\S32DS.3.6.4\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_6.0.8.202509081843\supportFiles_ARM\NXP\S32Mxxx\S32M276.mac) ...

REM Enable clocks for selected cores in MC_ME module

Delaying for 200mS ...

Done.

REM Initialize RAM and DMA:

REM Initialize DMA TCD:

REM Copy valid executable code to RAM for each core to be used.

REM Enable required cores in MC_ME:

Delaying for 20mS ...

Done.

 

Reset script (C:\NXP\S32DS.3.6.4\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_6.0.8.202509081843\supportFiles_ARM\NXP\S32Mxxx\S32M276.mac) completed.

 

 

PEmicro GDB Launch Failure : Error during flash programming. Terminating debug session.

 

PE-ERROR: Error downloading to the device. Terminating debug session.

Disconnected from "127.0.0.1" via 127.0.0.1. Disconnection by port "56559" from 6224

PE-ERROR: Error : Attempted to send response but connection already closed.

Disconnected from "127.0.0.1" via 127.0.0.1. Disconnection by port "56563" from 7224

INFO: DAP IDCODE = 0x6BA02477

Target Disconnected.

Tags (1)
0 Kudos
Reply
1 Solution
1,485 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

1. Verify Device Unlock and Security State

  • Internal bootloader or previous code may have locked the debug interface.

  • Ensure bootloader isn't interfering or enabling a secure/startup lock.

  • Use tools like "Attach" (instead of Connect) or perform a mass erase to clear security lock.

2. Confirm Power and Clock Configuration

  • From the AN13461 checklist:

    • Validate all MCU rails (VSUP, VDD, VDDA, etc.) and current load during reset/flash

    • Check external oscillators/crystals to ensure the device isn't stuck waiting for clock input

3. Follow JTAG/SWD Hardware Guidelines for S32M2

  • According to AN14116:

    • Ensure JTAG/SWD pins are correctly wired and not held in reset.

    • Follow reset sequence: Use open-drain reset pin and controlled reset/assert release cycles.

    • Set core-halt through the DAP (Debug Access Port) prior to mass erase or flash.

Best regards,

Peter

View solution in original post

0 Kudos
Reply
2 Replies
1,486 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

1. Verify Device Unlock and Security State

  • Internal bootloader or previous code may have locked the debug interface.

  • Ensure bootloader isn't interfering or enabling a secure/startup lock.

  • Use tools like "Attach" (instead of Connect) or perform a mass erase to clear security lock.

2. Confirm Power and Clock Configuration

  • From the AN13461 checklist:

    • Validate all MCU rails (VSUP, VDD, VDDA, etc.) and current load during reset/flash

    • Check external oscillators/crystals to ensure the device isn't stuck waiting for clock input

3. Follow JTAG/SWD Hardware Guidelines for S32M2

  • According to AN14116:

    • Ensure JTAG/SWD pins are correctly wired and not held in reset.

    • Follow reset sequence: Use open-drain reset pin and controlled reset/assert release cycles.

    • Set core-halt through the DAP (Debug Access Port) prior to mass erase or flash.

Best regards,

Peter

0 Kudos
Reply
1,351 Views
MarkShen__
Contributor II
Hello Peter,
Thanks for your reply. I've identified the cause of this problem as well as the solution.The hardware error during the upgrade was caused by a function of the bootloader not being placed in the RAM area. I created a new project and re-flashed it, and the ECU returned to normal.

BR, Mark
0 Kudos
Reply