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

Error Trying to program nRF51822

Hello,

I have been looking to program this IC, connecting via SWD with no luck. I can connect to the target but for some reason once i try to perform erase programming or read i got an error message with the RAM.

Connecting ...
 - Connecting via USB to J-Link device 0
 - Target interface speed: 2000 kHz (Fixed)
 - VTarget = 3.254V
 - Initializing CPU core (Init sequence) ...
    - Executing Reset (0, 0 ms)
    - Initialized successfully
 - Target interface speed: 2000 kHz (Fixed)
 - Connected successfully
Erasing chip ...
 - Erasing 257 sectors, 2 ranges, 0x0 - 0x3FFFF, 0x10001000 - 0x100013FF
 - ERROR: RAM check failed @ address 0x20000000.
 - ERROR: Write: 0x03020100 07060504
 - ERROR: Read: 0x00000000 00000000
 - ERROR: (0 bytes of RAM have been checked successfully)
 - ERROR: Failed to erase chip
Disconnecting ...
 - Disconnected 

I am using a JFlasher portable, is there any known compatibility issue with this IC?

Parents
  • I think JFlash gives this error if the device is read protected.

    Try connecting then issuing these commands

    w4 4001e504 2
    w4 4001e50c 1
    w4 4001e514 1
    

    It should remove read protection and also erase the device (though you many want to erase again just to be sure after issuing those commands

  • Try using the GUI version not the command line and make sure you select the correct template

    Try using the older version of JLink (5.02g) it seems to work

    Strangely, I can't connect if I manually type commands but if I make a script file just containing

    loadbin r q

    and start jlink like this

    jlink -device nRF51822_XXAA -CommanderScript cmdfile.jlink

    it works fine I have windows bat file that creates the bat file, so I can do drag and drop upload of files, I also use the Arduino IDE sometimes to program the nRF51822 and it uploads via a bat file as well

Reply
  • Try using the GUI version not the command line and make sure you select the correct template

    Try using the older version of JLink (5.02g) it seems to work

    Strangely, I can't connect if I manually type commands but if I make a script file just containing

    loadbin r q

    and start jlink like this

    jlink -device nRF51822_XXAA -CommanderScript cmdfile.jlink

    it works fine I have windows bat file that creates the bat file, so I can do drag and drop upload of files, I also use the Arduino IDE sometimes to program the nRF51822 and it uploads via a bat file as well

Children
No Data
Related