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

nrfjprog over usb

I use usb with secure bootloader to flash 52833/840/832 boards.  Is there a way to use the nrfjprog --memwr/rd over the usb after a DFU on USB upgrade to new app?

Steps w/o DFU  are as follows

nrfjprog --recover

make flash_softdevice

make clean

make -j12 flash (app)

nrfjprog --memwr 0x7fd00 --val 0x10012048

nrfjprog --memwr 0x7fd00 --val 0

nrfjprog --memrd 0x7fd00 --n 8

This works fine

But after the bootloader is loaded with SWD

Then the softdevice is flashed

then plug the usb in and find the port

then the nrfutil zip file --p COMXX --b 115200

At this point the app is working

Can I use nrfjprog over USB to write the addresses or is there another way that you can share with me to get this accomplished?

Thanks

  • Hi Stevie, 

    I afraid what you are asking for is not possible. 
    nrfjprog only works with the SWD programming interface. 

    What you got when you call nrfutil to download the .zip file via USB is the nrfutil talk to the bootloader to send the image via UART/USB to the bootloader and the bootloader replace the old image with the new image. 

    You can, however, modify the bootloader so that it also accept a custom command to read out a place in flash and reply that via UART. But you would need to implement that and the application on PC to talk to the bootloader. 

Related