Several problems arising with OTA DFU.

Hi, I am currently using SDK 15.3.0 with SD 6.1.1 and am playing around with the buttonless DFU.

I noticed that after uploading the new firmware via nrf connect, many times the MCU just hardfaults. It happened e.g. after I set NRF_LOG_ENABLE to 0 in the sdk_config.h file for the new firmware (it was still enabled in the old version). this lead to an internal error in a ble advertising function - doesn't make sense at all. I also hardfault or run into an error when I only comment out NRF_LOG_INIT() in a newer version. Why doesn't this just work, which memory addresses does the logging module use that a dfu will certainly end in a broken firmware?

So now I turn of logging in an initial version and want to update the device with a new software, now apparently a timer is not working alright. Something generally seems wrong with the DFU process but I cant debug it and don't know which parameters might be wrong. 

Parents
  • Hi,

    Have you confirmed that you get an actual hardfault, or something else? What have you found out by debugging? How exactly did this happen? (There are very many things that can go wrong, so we need to narrow things down as much as possible as early as possible).

    Is it so that the issue issue happened after adding buttonless DFU to your application, or does it happen after a DFU update?

    The application would be identical after a DFU update as if it was flashed directly (assuming you made no changes), but there could be changed in the other parts of the flash in case of a dual bank update. Normally that would not cause problems, but it could potentially trigger a bug in your application.

    In short, please explain in more detail what you did and what exactly fails and how. If you go back to when this issue did not happen, can you isolate at which point things start to fail and what exactly you do in that case? Then, what can you find from debugging (for instance logging and inspecting after en error handler is run or something else, depending on what actually happened)?

  • okay let me try to narrow it down.

    It happened while performing a DFU, I did that by using the nrf connect app and then the MCU didn't show up again (no advertising) hence I attached a debugger and noticed that the firmware crashed in some sort of logging process. But this was only one of some issues, it also happened once that advertising failed with an internal error (0x3)

    > but there could be changed in the other parts of the flash in case of a dual bank update. Normally that would not cause problems, but it could potentially trigger a bug in your application.

    yep that's what I though as well, I am using the internal flash storage module, writing to addresses 07c000 to 7ffff, maybe this helps? How can I see which banks are being written during the dfu process and therefore always keep those clear? Could it also be a problem if the application is too big? 

    I will inspect the issue in more detail and come back with more explanation, but that's it for now.

Reply
  • okay let me try to narrow it down.

    It happened while performing a DFU, I did that by using the nrf connect app and then the MCU didn't show up again (no advertising) hence I attached a debugger and noticed that the firmware crashed in some sort of logging process. But this was only one of some issues, it also happened once that advertising failed with an internal error (0x3)

    > but there could be changed in the other parts of the flash in case of a dual bank update. Normally that would not cause problems, but it could potentially trigger a bug in your application.

    yep that's what I though as well, I am using the internal flash storage module, writing to addresses 07c000 to 7ffff, maybe this helps? How can I see which banks are being written during the dfu process and therefore always keep those clear? Could it also be a problem if the application is too big? 

    I will inspect the issue in more detail and come back with more explanation, but that's it for now.

Children
No Data
Related