This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-CC3235SF: Restore to factory image (file: factory.img)

Part Number: LAUNCHXL-CC3235SF
Other Parts Discussed in Thread: UNIFLASH

I am curious if there are any instructions for creating the file "factory.img"?  It seems like a great feature:  By depressing a switch during boot, the factory image is restored.  Of course, I would need the factory image to be a "golden" load that is created for this particular product.

Thanks!

Fred

  • Hi Fred,

    The creation of the factory image is done automatically by the CC3235 NWP when the filesystem is created during the UART programming process or during first boot if using direct SPI flash programming. The only change you need to make to ensure that the factory.img is created is that the "Restore To Factory Configuration" is set to "Defaults and Image" before you create + flash your CC3235:

    Enabling the restore-to-factory SOP option is also required if you wish to use the HW restore option. There is a method to rollback to the factory image in your application code, but that method requires your application to be functional while the HW SOP method will work even if your application binary is corrupt through a bad OTA update or similar.

    As for a 'golden' factory firmware, it is definitely best practice to thoroughly test your factory image to ensure that it functions correctly and reliably. One approach you can use is have your golden firmware be a very simple setup-required image that simply allows your end-user to provision and perform an OTA update to the latest FW. You may have noticed that many of the Wi-Fi IoT devices you use have a setup flow of (1) connect device to phone (2) provide home Wi-Fi details (3) wait for setup and updating to complete. Following that model, your golden firmware doesn't actually need to have your full device functionality, just to allow your user to connect it to their Wi-Fi and OTA update, to keep the risk of bugs and unexpected behavior as low as possible. As a bonus, this will require your users to run the device at the latest FW or one of your choosing out-of-box, to ensure things like security vulnerabilities or functional issues are patched.

    Let me know if you need more clarification or have further questions on using the factory restore feature.

    Regards,

    Michael

  • Thanks, Michael.  That is very helpful.  I see the file factory.img in the file list, so I see that Uniflash is putting it there.  On the eval board, there is SW4 that pulls SOP0 and SPO1 high.  When I burn a new image via OTA, then press SW4 during while pressing POR, then releasing SW4, after about 30-60sec, the board reverst to the older load burned by Uniflash. 

    What a great feature!  

    Cheers,

    Fred.