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.

CC3200 Fail-safe on /sys/mcuimg.bin

Other Parts Discussed in Thread: CC3200

As I understand it, if we open a file on the CC3200 FLASH for write and get reset without closing it, it's content is gone.

However if we use the flag _FS_FILE_OPEN_FLAG_COMMIT we should have a fail safe, insuring that in case of reset when the file is open, the old content of the file will be reserved.

My questions are as follows:

1. Can we always relay on this mechanism? i.e if we open a file for write with the fail-safe flag and get reset (interior or exterior) before closing the file, is it 100% guaranteed that the file will still be available, with the old content?

2. Can we use this mechanism with the FW code file (/sys/mcuimg.bin)? if we imlement a code update in which the FW code file is opened with the above mentioned flag, will a reset prior to closing always result in the old code running (rather than some corrupted code, unable to run)?

3. In the terms of this fail-safe mechanism, is there a difference between various types of reset (power-down, RESET_N being LOW, calling PRCMMCUReset, returning from WD interrupt without clearing it, etc)?

 

Thanks,

Tal

  • Hi Tal,

    To answer the root question in all of your questions here - No, this is not a 100% guarantee that the file will not be corrupted and always available. There is some manipulation of the filesystem metadata that occurs to switch which of the copies of the file should be active. If reset occurs during this manipulation, the filesystem can become corrupted. However, the failsafe feature is intended to help reduce the likelihood of this occurring.

    In addition to your consideration of the use of the failsafe option, I recommend you consider hardware design techniques to add to the robustness of the system. The considerations in the following guide can apply to the CC3200 as well:

    http://www.ti.com/lit/an/swra515a/swra515a.pdf

    Another step you can take is to support a factory reset in your system. There is not a factory reset feature implemented in CC3200, but the CC3220 does provide this option with not only the ability to trigger via software but also via a hardware based reset. If this is something you are looking for, I recommend considering the CC3220 as well. You can find more info on the Restore to Factory feature in section 7.13.1 of the CC3220 Network Processor Programmers Guide.


    Best Regards,

    Ben M

  • Hey Ben,

    Thanks for the detailed response!

    We will take this fact (that the fail-safe is not 100% secure) and your other recommendations into account.

    Thanks again,
    Tal