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

Flash Memory Corruption with FDS

I have had an issue recently with some beacons that I am using to log temperature data. A portion of the beacons drained their batteries very quickly and didn't respond to BLE as it was supposed to.

When connected to nrfConnect Programmer app this is what the flash memory was read to look like:

This can be compared with another beacon with the exact same code on it that worked properly:

 

I am using FDS as my flash data storage library.

SDK 14.1

nRF52-QFAA

It appears to me that the flash storage has corrupted and clobbered the boot loader, but I can't think of any reason why this would have happened?

My best guess was that the battery got low and the device started power cycling, which could have affected the flash memory initialisation, but it seems more like the flash memory interfering with the boot loader would have caused the batteries to go flat, not the other way round.

Do you have any suggested about what could have caused the issues that I'm seeing here?

Parents
  • Hello,

    Is it possible to get a flash dump of both devices? Alternatively if you could check whether the flash in the bootloader is any different on the two devices?

    If you recharge the "broken" device, does it operate as the other ones, or is it still not functional? I assume that when you say that the 

    If it isn't functional, there are some things that would be interresting to check:

    1: Are you able to debug the application on these devices without reprogramming them?

    2: If you reprogram them, only the application and not flash, using nrfjprog --program <application path> --sectorerase, do they work?

    3: If you completely erase the chip, and then reprogram (using the same application .hex file and same softdevice), do they work?

    Note that if you program them with the same application .hex file as they they already had, then the bootloader will accept the application file, and they should start. Hence, if you flash the application debug, you can try to find out what happens when the application starts. As you say, it is probably related to the FDS module, since the flash area in outside the application is different.

    Best regards,

    Edvin

  • Hey Edvin,

    Just in the middle of trying a few different approaches as suggested. How do you do a flash dump?

Reply Children
Related