Cannot flash nrf52840

Hi,

I was about to program my nrf52840 with minor changes in the dts and after that I cannot flash any other images to the device. This is what I get when I flash the board.

I also tried nrfjprog --eraseall and recover. All commands leads to the same error. Is there some way I can get the device back ? Thanks in advance.

Parents Reply Children
  • you can try to do 

    > nrfjprog --readcode --readuicr filename.bin 

    and compare this binary with the original binary you are trying to flash into it. 

    If there are differences then it is simply clear that atleast one flash sector is corrupted/damaged. You then need to replace chip.

  • Hi, there is an update. I checked like instructed. but there were no changes.So, out of curiosity, I tried flashing the device with an old program based on nrf5 sdk. Opened it in SES and flashed and it was all good.  The dk was up and running. I tried again with the NCS in VS code and this time, the previous error was not seen but i got a new problem.

    What does this mean ? Is my new code doing something wrong? I tried flashing the peripheral_uart example which is part of the NCS without any changes. But, again that failed too. The device reboots on its own and my UART is filled with this. This is the latest problem I've run into. Can you please help me solve this ? Thank you.

  • Hi, just to add to the above observations, in order to isolate the issue, ( whether it was caused by the UART module or the bluetooth module), I flashed the central_and_peripheral_hr example to the device in NCS and it was all fine. So, I went back and flashed my program and it was all fine again. The device behaves like nothing happened.
    But I would really like to know what went wrong here. Can you please clue me in ? thank you

  • You previous snapshot of the log shows that the application you flashed is rebooting quite early after reset. Not sure what that is but it would have been easier to start the program in debugger and use breakpoints to understand the where the reset is happening. 

    But since the problem went away we can only guess if this an application issue or something else.

  • I used debugger and it showed me that the error at settings_load() in main. But I had not modified the area. Also, the same application was the one loaded again. That is, the same application was the one which failed to flash and also the one that flashed successfully after a long time. I cannot understand what is wrong though.

Related