This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can't flash or erase - "Error: Timeout while checking target RAM, RAMCode did not respond in time."

I am currently unable to flash any new code or to erase the flash memory of my nRF52840 Preview DK boards.

I am using SES and the OB J-Link, but also tried JLinkExe and Ozone. I have the latest version v.6.86e but also tried older versions. I am under macOS 10.15, but also tried from a Raspi. I also tried a second board, same problem. I was experimenting with ITM and DWT data watchpoints before on both boards, I guess that destroyed something.

The output from JLinkExe is as follows:

Fullscreen
1
2
3
4
5
6
7
J-Link>erase
Erasing device...
****** Error: Timeout while checking target RAM, RAMCode did not respond in time. (PC = 0x00000000, CPSR = 0x00000000, LR = 0x61000000)!
Failed to prepare for programming.
Failed to execute RAMCode for RAM check!
ERROR: Erase returned with error code -1.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

J-Link does connect fine and it seems like I can do everything, except writing to the flash. The binary that is still on the boards is running and can be debugged.

I added J-Link logs from both SES as well as JLinkExe.

How can I solve this issue? Thanks

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
T1C5C4DC0 000:001.575 SEGGER J-Link V6.84a Log File
T1C5C4DC0 000:001.718 DLL Compiled: Sep 7 2020 17:28:41
T1C5C4DC0 000:001.728 Logging started @ 2020-10-23 10:05
T1C5C4DC0 000:001.737 - 1.742ms
T1C5C4DC0 000:001.807 JLINK_ExecCommand("EnableAutoUpdateFW", ...).
T1C5C4DC0 000:001.831 - 0.028ms returns 0x00
T1C5C4DC0 000:001.868 JLINK_OpenEx(...)
T1C5C4DC0 000:005.806 Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 17 2020 14:43:00
T1C5C4DC0 000:011.363 Hardware: V1.00
T1C5C4DC0 000:011.423 S/N: 683014029
T1C5C4DC0 000:011.451 OEM: SEGGER
T1C5C4DC0 000:011.464 Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
T1C5C4DC0 000:012.786 TELNET listener socket opened on port 19021
T1C5C4DC0 000:012.904 WEBSRV Starting webserver
T1C5C4DC0 000:012.964 WEBSRV Webserver running on local port 19080
T1C5C4DC0 000:013.002 - 11.148ms returns "O.K."
T1C5C4DC0 000:013.043 JLINK_GetEmuCaps()
T1C5C4DC0 000:013.078 - 0.050ms returns 0xB8EA5A33
T1C5C4DC0 000:013.100 JLINK_GetFirmwareString(...)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
T1108ADC0 000:000.894 SEGGER J-Link V6.72e Log File
T1108ADC0 000:001.591 DLL Compiled: May 20 2020 12:47:06
T1108ADC0 000:001.604 Logging started @ 2020-10-23 10:08
T1108ADC0 000:001.899 JLINK_SetWarnOutHandler(...)
T1108ADC0 000:001.934 - 0.040ms
T1108ADC0 000:002.204 JLINK_OpenEx(...)
T1108ADC0 000:004.939 Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 17 2020 14:43:00
T1108ADC0 000:007.082 Hardware: V1.00
T1108ADC0 000:007.123 S/N: 683014029
T1108ADC0 000:007.138 OEM: SEGGER
T1108ADC0 000:007.153 Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
T1108ADC0 000:009.943 TELNET listener socket opened on port 19021
T1108ADC0 000:010.086 WEBSRV Starting webserver
T1108ADC0 000:010.121 WEBSRV Failed to put socket into listener state (port 19080)
T1108ADC0 000:010.164 WEBSRV Webserver running on local port 19081
T1108ADC0 000:010.191 - 7.993ms returns "O.K."
T1108ADC0 000:010.536 JLINK_GetFirmwareString(...)
T1108ADC0 000:010.566 - 0.036ms
T1108ADC0 000:010.580 JLINK_GetHardwareVersion()
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Parents Reply Children
  • Thanks, it seems like the recover process ran fine, but I still get the same error when trying to erase the flash. So it didn't help for now.

    Fullscreen
    1
    2
    3
    nrfjprog --recover --log -f nrf52
    Recovering device. This operation might take 30s.
    Erasing user code and UICR flash areas.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    [2020-Oct-24 13:04:12] [ info] --------------------------------------------------------------------------------
    [2020-Oct-24 13:04:12] [ info] nrfjprog --recover --log -f nrf52
    [2020-Oct-24 13:04:12] [ info] nrfjprog version 10.10.0
    [2020-Oct-24 13:04:12] [ info] --------------------------------------------------------------------------------
    [2020-Oct-24 13:04:12] [debug] [ nRF0x0] - open_dll
    [2020-Oct-24 13:04:12] [debug] [ nRF0x0] - Load library at /Applications/Nordic Semiconductor/nrfjprog/libjlinkarm_nrf52_nrfjprogdll.dylib.
    [2020-Oct-24 13:04:12] [debug] [ nRF0x0] - Library loaded, loading member functions.
    [2020-Oct-24 13:04:12] [debug] [ nRF0x0] - Member functions succesfully loaded.
    [2020-Oct-24 13:04:12] [debug] [Backend] - Logger callback at 0x10ac1b790 registered in Segger backend logger.
    [2020-Oct-24 13:04:12] [debug] [ JLink] - [Debug ] [JLink ] Logger callback at 0x10ac1b790 registered in JLink logger.
    [2020-Oct-24 13:04:12] [debug] [nRF520x0] - open
    [2020-Oct-24 13:04:12] [debug] [Backend] - open_dll
    [2020-Oct-24 13:04:12] [debug] [Backend] - No J-Link DLL path was provided. Attempting to auto detect.
    [2020-Oct-24 13:04:12] [debug] [Backend] - Load library at /Applications/SEGGER/JLink/libjlinkarm.6.84.1.dylib.
    [2020-Oct-24 13:04:12] [debug] [Backend] - Library loaded, loading member functions.
    [2020-Oct-24 13:04:12] [debug] [Backend] - Member functions succesfully loaded.
    [2020-Oct-24 13:04:12] [debug] [Backend] - dll_version
    [2020-Oct-24 13:04:12] [debug] [Backend] - Segger dll version 6.84.a loaded.
    [2020-Oct-24 13:04:12] [debug] [ nRF0x0] - enum_emu_snr
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi,

     

    Are you able to flash using nrfjprog directly?

    nrfjprog --program <hex file> --sectorerase -f nrf52

     

    Kind regards,

    Håkon

  • Indeed that worked! Now I also can flash via SES again. Do you have an idea what the problem could have been? And what does nrfjprog do to resolve it?

    Thanks a lot !

  • Hi,

     

    I'm glad to hear that your system is up and running again! 

    It might be a bug on the segger driver side for macos, but I'm unsure. I have seen that error code before, but usually its due to too fast SWD frequency, or a bad connection. In the previous scenarios that I have observed, nrfjprog would also fail.

     

    Kind regards,

    Håkon