This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RM48L952ZWT: Erasing chip if bad code inside

Other Parts Discussed in Thread: UNIFLASH

On one of my boards I uploaded code, which sadly causes the board to perpetually reset. I cannot erase the chip using UniFlash on that board as a result. Is there a way to forcefully erase the board?

I know in many devices (routers, etc.), there is a reset button, which erases user configuration and returns the device to default behavior. Is there such a thing on the Hercules chip or something that I can do in UniFlash?

  • Hi Sarah,

    First of all there is no such mechanism to erase the flash via an external pin.

    Do you remember prior to the reset lockup what you might have done in your software? For example, you might have an instruction to generate a software reset or you have a watchdog timeout that is too short such that your code is not quick enough to write the watchdog key before the timeout happens?

    Can you even connect to the target? Can you please confirm?

    Please Try the below steps.

    1] Start CCS
    2] Open Target Configurations Window.
    3] Right click on your target configuration for your device.
    4] Click on Launch Selected Configuration.
    5] A new window (Debug) should be open.
    6] Right click on the entry in this window and select Show all Core.
    7] Right click on "Icepick" and select "Connect"
    8] Icepick should be connected now.

    9) In CCS Go to Run->Reset->System Reset to reset the device

    10] right click on "DAP" and select "Connect"
    11] DAP should be connected now.


    12] Right Click on Cortex_R4 and select "Connect"

    13) if you are unable to connect to the CPU, it will give you error and ask you to retry.

    14) Hold the nRST input and release it at the same time you hit the retry button. What this is trying to do is to allow the debugger to connect to the CPU before the CPU executes any code that might have triggered a reset event.

    You might need to try step 12-14 tens of times and if you are lucky you will connect the CPU. After you connect to the CPU, go to Tools->On-Chip Flash and at the very bottom of the On-Chip Flash window click the Erase Flash. After the flash is erase, reload your new program. Make sure you know what might have triggered the reset in the first place and fix the problem or otherwise you will have the same problem again.
  • Hi Sarah,
    If your question is answered can you please close the thread by clicking the 'Verify Answer' button? Thanks.