Hello~ I'm using JLinkEXE to flash an nRF51822 chip. When I use nrfgo and press "erase all", it wroks. But after if I flash the s130, I can't erase the s130 with command "erase all" using JLinkExe. I wonder what command can erase the softdevice?
Hello~ I'm using JLinkEXE to flash an nRF51822 chip. When I use nrfgo and press "erase all", it wroks. But after if I flash the s130, I can't erase the s130 with command "erase all" using JLinkExe. I wonder what command can erase the softdevice?
You write to the NVMC, asking it to erase the device. According to the User Specification document, the NVMC base address is 0x4001E000 for nRF51. You first want to enable erasing, then start the chip erase. This can be done from JLinkEXE as
w4 4001E504, 2
w4 4001e50C, 1
Which firsts write a 2 (erase enabled) to the CONFIG register, then writes a 1 (erase start) to the ERASEALL register.
You also have to make sure to give the correct device in the --device parameter for JLinkExe.