Hello, At first by using Renesas Flash programmer., I have performed a target read using SWD for the code flash (all blocks), data flash (1 KB), and config area (36 Bytes), all of which were in a 0xFF state. I then wrote to the code flash (all blocks), including block 0 with random data. Following this, I was unable to access the RA0E1 target via SWD, An error (E4000003) is shown during the connection attempt.Even when tried with UART interface also displays error (E3000105)
what could be the cause of this issue? or what steps can I take to recover it?any suggestion would be greatly appreciated.Thanks.
Hello,
RFP does not support RA0E1 via 2-wire UART - only via SWD.
Please try to erase block 0 with the attached script.
Modify the JLink_path.bat to match with your J-Link installation path and run the .bat file.
RA0E1_Erase_Block_0.zip
Hello, I appreciate your prompt reply, The installation directory and version are identical to those specified in JLink_path.bat, namely, "C:\Program Files\SEGGER\JLink_V838" and when I run the Erase_Block_0_RA0E1.bat in the command prompt, it shows the following error:it is possible that the contents of RA0E1_Erase_Block_0.zip contain invalid code. Could you kindly verify this and provide us an appropriate solution? Any suggestions would be highly valued.
Surender said: I then wrote to the code flash (all blocks), including block 0 with random data
There is a chance that this enabled accidentally the ID code protection for on-chip debugger by writing the OSIS registers with random data. This protection may or may not allow connecting again to the device.
If you do not know the correct ID code, and the protection is enabled with bit 127, 126 set to 1 (2nd case on above table), you can issue the ALeRASE ID code via the debugging interface with the attached scipt (again run the .bat file and modify the j-link installation path).
https://community.renesas.com/cfs-file/__key/communityserver-discussions-components-files/256/RA0E1_5F00_ALeRASE.7z
Hello AZ,Thanks for the quick reply, the installation directory and version are identical to those specified in JLink_path.bat, namely, "C:\Program Files\SEGGER\JLink_V838" and when I run the ID_Code_ERASEALL_RA0E1.bat in the command prompt, it shows the following error:"Could not connect to the target device" and the RA0E1 mcu is shown below.I'm not sure about which data has become corrupted on the board. Are there any alternative methods to recover the board? Any suggestions would be greatly appreciated.
MCUSTAT remains 0x0000 and this means that the authentication fails.
It is possible that bit 127 is 0 which means that the connection to on-chip debugger is always prohibited.
Hello AZ,Thanks for the reply, is there any way to recover or the board is bricked permanently?
Regarding UART:
As previously mentioned, RFP does not support RA0E1 through a 2-wire UART. Does the board have a boot pin and a bootloader manual? I was unable to locate the boot pin and the bootloader documentation. Any suggestions or support would be appreciated.
RA0E1 devices do not have a MD pin, because there is only single-chip mode - no boot mode:
That is why there is no support by serial programming by RFP.
If the case is that you have accidentally written the OSIS registers with random values, the device is not exactly bricked you just cannot access it via the debugging interface.
Hello AZ,Thanks for quick reply,is there any possible way to get access via debugging interface?if code flash block 0 OFS1 register (0x404) bit 15 got changed, then J-Link OB will not connect to the RA0E1 right? as per the Board document section 11. can we short jumper J9 and use CN4 external debugger to get access via debugging?any suggestions?
You can try that with an E2 or E2 Lite. The E2/E2 Lite user manual for RA mentions that: During Debugging, Option setting memory(OFS1.PORTSELB) value is masked and fixed to the RES input.
https://www.renesas.com/en/document/mat/e2-emulator-e2-emulator-lite-additional-document-users-manual-notes-connection-ra-devices?srsltid=AfmBOoo60zVvS0Mlv9QFvoKdugUH3KRY_bpY1GilPb4V2cz4SNoABL4G
If PORTSELB bit issue it may be worth a try.
Thank you for your prompt response. I will inform you of the status if there are any updates later.