Ram is not writable on R7FA2A1AB

I believe I have accidentally overwritten the option setting memory when uploading a program to an RA2A1 MCU.  I am using it with a J-Link mini tool on Linux.  The symptoms are:

1) I can reset and halt the CPU and examine registers and memory

2) I can single step through the program 

3) Writes to SRAM are ignored - it always reads as zero

4) I can't flash new code/option bytes as the JLink tools require use of RAM within the MCU 

Is there a way to restore the device to factory defaults using the J-Link mini tool.  I have tried various Renesas tools and none seem to work.  I keep getting an error "Emulator does not support pin override"

Parents Reply
  • If you have enabled the security MPU by writing prgram data into the Option Setting memory 0x400 to 0x43F

    then there is the destinct possibility you have locked the device. The only thing I can suggest is you try the attached script, that will try to erase block 0 of the code flash, with the JLink directly writing to the flash controller registers (rather than using a RAM based kernel to do the erasing, that it normal does).

    You will need the Segger software and documentation pack to be installed :-

    www.segger.com/.../

    Then edit the JLink_path.bat to point to the location of JLink.exe.

    Open a CMD prompt and run Erase_Block_0_RA2A1.bat.

    If it erases block 0 of the code flash successfully, you should see :-

    If this does not work, then the device really is locked.

    The script is written for Windows.

    RA2A1_Erase_Block_0.zip

Children