Please tell me how to use nrfjprog command to program softdevice
Please tell me how to use nrfjprog command to program softdevice
Hi Fiske,
Place this to batch file and run:
set SOFTDEVICE_NAME=s132_nrf52_2.0.1_softdevice.hex
nrfjprog --program %SOFTDEVICE_NAME% --verify --chiperase -f NRF52
(you obviously need to change chip family and SoftDevice file name according to your needs)
However note that SoftDevice itself won't do anything and if you want to flash application on top of it most nrfjprog
commands will complain that chip is not erased entirely. So you are most probably looking for this sequence:
set MERGE_NAME=merged.hex
set SOFTDEVICE_NAME=s132_nrf52_2.0.1_softdevice.hex
set NRF5_CHIP_FAMILY=NRF52
set APP_NAME=my-ble-application.hex
mergehex -m %SOFTDEVICE_NAME% %APP_NAME% -o %MERGE_NAME%
nrfjprog --program %MERGE_NAME% --verify --chiperase -f %NRF5_CHIP_FAMILY%
and alternatively put this line in the end:
nrfjprog --rbp ALL -f %NRF5_CHIP_FAMILY%
and of course then you need to put this line before nrfjprog --program...
:
nrfjprog --recover -f %NRF5_CHIP_FAMILY%
Cheers Jan