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

Problem with nrfjprog and corrupted images

Hi,

I use GCC for compilation and nrfjprog for flashing. A few weeks ago I needed to switch on compiler optimization (Level 1) because my code grew a little too big. Now I've often experienced corrupt images after flashing only the application. nRFgo Studio tells me that the SoftDevice is still intact, but my application crashes and behaves weird until I do a full chip erase. A readback of the application.hex from a corrupt state gave me a 900kb file instead of the 200kb from an intact application.

I use this command for flashing the application: nrfjprog -s 12345 --program hexfile.hex --sectorerase --family NRF51 && nrfjprog -s 12345 --reset

When I do a chiperase, flash the softdevice and then the application, everything works as expected.

Any ideas? Marius

Parents
  • normally i read it from the chip

    nrfjprog -e nrfjprog --memrd 0x10001000 --n 200 now you see all UICR registers are clean

    nrfjprog --program my_application.hex nrfjprog --memrd 0x10001000 --n 200

    now you will know if anything else is written to UICR

    I have missed to see that you mentioned that the error happens occasionally. any possibility that i can get the application.hex to try it out here?

Reply
  • normally i read it from the chip

    nrfjprog -e nrfjprog --memrd 0x10001000 --n 200 now you see all UICR registers are clean

    nrfjprog --program my_application.hex nrfjprog --memrd 0x10001000 --n 200

    now you will know if anything else is written to UICR

    I have missed to see that you mentioned that the error happens occasionally. any possibility that i can get the application.hex to try it out here?

Children
No Data
Related