Hello, @supporter.
I am working on an RA6M3G device.
I tried to erase the chip using J-Flash Lite V7.92c but was unsuccessful.
I used Jlink Commander V7.92c but still failed.
Here log:
SEGGER J-Link Commander V7.92c (Compiled Aug 30 2023 15:00:03) DLL version V7.92c, compiled Aug 30 2023 14:58:23 Connecting to J-Link via USB...O.K. Firmware: J-Link OB-S124 compiled Jun 20 2023 17:09:11 Hardware version: V1.00 J-Link uptime (since boot): 0d 00h 06m 55s S/N: 831334275 USB speed mode: Full speed (12 MBit/s) VTref=3.300V Type "connect" to establish a target connection, '?' for help J-Link>connect Please specify device / core. <Default>: R7FA6M3AH Type '?' for selection dialog Device> Please specify target interface: J) JTAG (Default) S) SWD T) cJTAG TIF>S Specify target interface speed [kHz]. <Default>: 4000 kHz Speed> Device "R7FA6M3AH" selected. Connecting to target via SWD InitTarget() start Identifying target device... SWD selected. Executing JTAG -> SWD switching sequence... Initializing DAP... DAP initialized successfully. InitTarget() end - Took 11.2ms Found SW-DP with ID 0x5BA02477 DPIDR: 0x5BA02477 CoreSight SoC-400 or earlier Scanning AP map to find all available APs AP[2]: Stopped AP scan as end of AP map has been reached AP[0]: AHB-AP (IDR: 0x24770011) AP[1]: APB-AP (IDR: 0x44770002) Iterating through AP map to find AHB-AP to use AP[0]: Core found AP[0]: AHB-AP ROM base: 0xE00FF000 CPUID register: 0x410FC241. Implementer code: 0x41 (ARM) Found Cortex-M4 r0p1, Little endian. FPUnit: 6 code (BP) slots and 2 literal slots CoreSight components: ROMTbl[0] @ E00FF000 [0][0]: E000E000 CID B105E00D PID 000BB00C SCS-M7 [0][1]: E0001000 CID B105E00D PID 003BB002 DWT [0][2]: E0002000 CID B105E00D PID 002BB003 FPB [0][3]: E0000000 CID B105E00D PID 003BB001 ITM [0][4]: E0040000 CID B105900D PID 000BB9A1 TPIU [0][5]: E0041000 CID B105900D PID 000BB925 ETM [0][6]: E0042000 CID B105900D PID 002BB908 CSTF [0][7]: E0043000 CID B105900D PID 001BB961 TMC [0][8]: E0044000 CID B105F00D PID 001BB101 TSG Memory zones: Zone: "Default" Description: Default access mode Cortex-M4 identified. J-Link>erase No address range specified, 'Erase Chip' will be executed 'erase': Performing implicit reset & halt of MCU. Reset: Halt core after reset via DEMCR.VC_CORERESET. Reset: Reset device via AIRCR.SYSRESETREQ. T-bit of XPSR is 0 but should be 1. Changed to 1. T-bit of XPSR is 0 but should be 1. Changed to 1. Erasing device... J-Link: Flash download: Only internal flash banks will be erased. To enable erasing of other flash banks like QSPI or CFI, it needs to be enabled via "exec EnableEraseAllFlashBanks" ****** Error: Timeout while erasing sectors, RAMCode did not respond in time (PC = 0x1FFE040A, XPSR = 0x41000000, SP = 0x1FFE08C0)! Failed to erase sectors. J-Link: Flash download: Total time needed: 10.220s (Prepare: 0.161s, Compare: 0.000s, Erase: 10.006s, Program: 0.000s, Verify: 0.000s, Restore: 0.052s) ERROR: Erase returned with error code -5. J-Link>
Could you please help me check it and give me the solution?
Thank you.
I think the problem is in your connection. Did you supply 3.3V externally on your VCC pin of your Segger Tool and your board?
Hello @nskrkmz ,
Because the RA6M3 device supports debugging on board, I using Micro USB to connect J10 (Board RA6M3) and PC.
Can you connect with J-Link commander and read AWS register:
>mem32 0x0100A164 1
Hello,
This result:
At the screenshot that you sent with Segger J-link to flash download, the process is stuck for long time or just 1-2 seconds?
Also, on the J-Flash Lite V7.92c, do you see the same error as your initial screenshot or something else?
> At the screenshot that you sent with Segger J-link to flash download, the process is stuck for long time or just 1-2 seconds?
The process is stuck for just 1-2 seconds.
> On the J-Flash Lite V7.92c, do you see the same error as your initial screenshot or something else?
I see the same error.
Thank you
Hello cu,
Try another script file, that you can find on the link below:
https://github.com/renesas/ra-fsp-examples/blob/master/application_projects/r11an0416/reset_scripts/smpu_aws_reset_script/RA6M3_Erase_SMPU_AWS.jlink
If that doesn't work, I cannot think any other solution.
Regards
Hello Al_Renesas,
It doesn't work .
After running the script, I tried to erase it but was unsuccessful.
Regards.
The log after I run the script.
J-Link Command File read successfully.Processing script file...J-Link>Device R7FA6M3AHJ-Link connection not established yet but required for command.Connecting to J-Link via USB...O.K.Firmware: J-Link OB-S124 compiled Jun 20 2023 17:09:11Hardware version: V1.00J-Link uptime (since boot): 0d 00h 00m 15sS/N: 831334275USB speed mode: Full speed (12 MBit/s)VTref=3.300VJ-Link>si SWDSelecting SWD as current target interface.J-Link>speed 4000Selecting 4000 kHz as target interface speedJ-Link>connectDevice "R7FA6M3AH" selected.
Connecting to target via SWDInitTarget() startIdentifying target device...SWD selected. Executing JTAG -> SWD switching sequence...Initializing DAP...DAP initialized successfully.Low power mode detected. Waking device from low power mode.InitTarget() end - Took 12.0msFound SW-DP with ID 0x5BA02477DPIDR: 0x5BA02477CoreSight SoC-400 or earlierScanning AP map to find all available APsAP[2]: Stopped AP scan as end of AP map has been reachedAP[0]: AHB-AP (IDR: 0x24770011)AP[1]: APB-AP (IDR: 0x44770002)Iterating through AP map to find AHB-AP to useAP[0]: Core foundAP[0]: AHB-AP ROM base: 0xE00FF000CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)Found Cortex-M4 r0p1, Little endian.FPUnit: 6 code (BP) slots and 2 literal slotsCoreSight components:ROMTbl[0] @ E00FF000[0][0]: E000E000 CID B105E00D PID 000BB00C SCS-M7[0][1]: E0001000 CID B105E00D PID 003BB002 DWT[0][2]: E0002000 CID B105E00D PID 002BB003 FPB[0][3]: E0000000 CID B105E00D PID 003BB001 ITM[0][4]: E0040000 CID B105900D PID 000BB9A1 TPIU[0][5]: E0041000 CID B105900D PID 000BB925 ETM[0][6]: E0042000 CID B105900D PID 002BB908 CSTF[0][7]: E0043000 CID B105900D PID 001BB961 TMC[0][8]: E0044000 CID B105F00D PID 001BB101 TSGMemory zones: Zone: "Default" Description: Default access modeCortex-M4 identified.J-Link>rReset delay: 0 msReset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.Reset: Halt core after reset via DEMCR.VC_CORERESET.Reset: Reset device via AIRCR.SYSRESETREQ.T-bit of XPSR is 0 but should be 1. Changed to 1.T-bit of XPSR is 0 but should be 1. Changed to 1.J-Link>w2 0x4001E3FE, 0xA501Writing A501 -> 4001E3FEJ-Link>w4 0x4001E020, 0x00000000Writing 00000000 -> 4001E020J-Link>mem32 0x4001E020, 14001E020 = 00000000J-Link>sleep 10Sleep(10)J-Link>w2 0x407FE0E4, 0x1E02Writing 1E02 -> 407FE0E4J-Link>w1 0x4001E416, 0x01Writing 01 -> 4001E416J-Link>w2 0x407FE084, 0xAA01Writing AA01 -> 407FE084J-Link>w4 0x407FE030, 0x0000A160Writing 0000A160 -> 407FE030J-Link>w1 0x407E0000, 0x40Writing 40 -> 407E0000J-Link>w1 0x407E0000, 0x08Writing 08 -> 407E0000J-Link>w2 0x407E0000, 0xffffWriting FFFF -> 407E0000J-Link>w2 0x407E0000, 0xffffWriting FFFF -> 407E0000J-Link>w2 0x407E0000, 0xffffWriting FFFF -> 407E0000J-Link>w2 0x407E0000, 0xffffWriting FFFF -> 407E0000J-Link>w2 0x407E0000, 0xffffWriting FFFF -> 407E0000J-Link>w2 0x407E0000, 0xffffWriting FFFF -> 407E0000J-Link>w2 0x407E0000, 0xffffWriting FFFF -> 407E0000J-Link>w2 0x407E0000, 0xffffWriting FFFF -> 407E0000J-Link>w1 0x407E0000, 0xD0Writing D0 -> 407E0000J-Link>mem32 0x407FE080, 1407FE080 = 00000000J-Link>sleep 1000Sleep(1000)J-Link>mem32 0x407FE080, 1407FE080 = 00000000J-Link>w2 0x407FE084, 0xAA00Writing AA00 -> 407FE084J-Link>mem32 0x0010A160,160010A160 = 000000F0 C0FF0800 FFFFFF00 FFFFFF0B0010A170 = 0F50FFFF BBBBEBFF FF0F30BB 000000B00010A180 = B0FF0F00 00000000 00B0FF0F 0F0000000010A190 = 0000B0FF FF0F0000 000000B0 B0FF0F000010A1A0 = 00000000 FFFFFF0F 0F0040FA FFCFFFFF0010A1B0 = 770500F8 FFCF0261J-Link>* Reset the device */Unknown command. '?' for help.J-Link>rReset delay: 0 msReset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.Reset: Halt core after reset via DEMCR.VC_CORERESET.Reset: Reset device via AIRCR.SYSRESETREQ.T-bit of XPSR is 0 but should be 1. Changed to 1.J-Link>sleep 10Sleep(10)J-Link>w2 0x407FE0E4, 0x1E08Writing 1E08 -> 407FE0E4J-Link>w1 0x4001E416, 0x01Writing 01 -> 4001E416J-Link>w2 0x407FE084, 0xAA01Writing AA01 -> 407FE084J-Link>w4 0x407FE030, 0x00000000Writing 00000000 -> 407FE030J-Link>w1 0x407E0000, 0x20Writing 20 -> 407E0000J-Link>w1 0x407E0000, 0xD0Writing D0 -> 407E0000J-Link>mem32 0x407FE080, 1407FE080 = 00000000J-Link>sleep 1000Sleep(1000)J-Link>mem32 0x407FE080, 1407FE080 = 00000000J-Link>w2 0x407FE084, 0xAA00Writing AA00 -> 407FE084J-Link>mem32 0x00000000,1600000000 = EA412100 F44F6210 EA01417F 4311211000000010 = 027FF44F 2200EA02 EA42430A 4770600000000020 = 68114AAA 2801B110 E006D002 E000685000000030 = 07C06C10 F041D001 F0410110 6C50010800000040 = D5FC0480 05C06890 6011D5FC 489F477000000050 = 4A9F6801 60014011J-Link>* Reset the device */Unknown command. '?' for help.J-Link>rReset delay: 0 msReset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.Reset: Halt core after reset via DEMCR.VC_CORERESET.Reset: Reset device via AIRCR.SYSRESETREQ.T-bit of XPSR is 0 but should be 1. Changed to 1.
Script processing completed.
Type "connect" to establish a target connection, '?' for helpJ-Link>
Hi, I have the same problem, I used the EK-RA6M3G suddenly can not erase the chip, I tried the above two scripts are invalid, what other way
Did you solve the problem
this script resolved the issue I had as cu mentioned initiallyI am able to recover my RA6M3 EK board