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

ANT Firmware Update OTA, Would this work?

I have a 51422 board design and I just got Ant-FS working with our firmware so I can now download data from an external SPI flash to a desktop application.

I want to be able to update my code on the chip via an ANT download. I think it should be possible but I see more than a few hours to try this so I thought I would ask first (especially because not working would mostly likely be my fault anyway).

I want to have my code at startup read the external flash for a particular pattern at a particular address. If it finds the pattern, it copies data from external flash to internal code flash, erases external flash, and then resets itself.

My idea is that I could use ANT-FS to do an OTA update without a fancy bootloader. I can just use ANT-FS to erase the external flash and upload the trigger and the hex file to external flash and then trigger a reset.

Anyone see a reason that would not work? Can I simply copy the hex file generated by the compiler to internal flash starting at address 0?

David

  • It sounds as if this should be feasible, but I'm not sure exactly why you'd want to do this instead of using the internal flash of the nRF51422. For example, it sounds as if your solution would result in a bricked device if you lose power after having erased the external flash before having received a complete new image. I'm hence a little skeptical whether this is a good overall solution.

    I'd rather recommend you to start from the bootloader that's part of the SDK, and modify that to instead use an ANT-FS transport instead of the current HCI or BLE alternatives.

    Edit: Also make sure to take a look at the answer to this question.

Related