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.

Easy way to detect that firmware has been reloaded?

Hello,

I'm wondering if there's an easy way to determine that the firmware has been reloaded on a Stellaris processor (LM3S1J11 and LM4F232H5QD specifically). We could compare version strings, but this would not catch the case where the same version has been loaded again.

If it makes a difference, we are primarily interested in detecting a reload via serial UART and the ROM bootloader.

One method which could work would be having the firmware write to the program area of flash itself, but that seems dangerous (especially on the LM3S parts due to the flash issue).

I tried the reset cause register, and it does not appear to be able to differentiate between a normal power up or hard reset and a reset triggered by the bootloader.

Any thoughts?

Thanks,

---Karl

  • Believe that short-lived flash issue was much confined to "Tempest" class M3 MCUs.  (and unsure if yours fits that class) 

    Should that be the case - you may consider sot-23 (or similar) EEprom to hold such data.  Agree that this does add a device (although not much cost/size) and with proper plan/protocol - may serve your purpose...

  • Wow, that was a quick reply!

    Yes, the LM3S part which we currently have deployed is definitely affected by the flash issue.

    We already have an I2C EEPROM on the board, though it is an SOIC. ;) In fact, that is the problem: said EEPROM holds configuration data for the system, the structure of which is dependent upon the firmware version.

    The system can already detect a different config version and rewrite a clean copy. However, we would also like to have it do the same thing if the same version of firmware is reloaded. Effectively, we are looking to implement an automatic 'coldstart' (as this company refers to it). It has been done in previous designs (based on 68HC11) by having the code modify itself in flash, but we'd like to find a cleaner solution.

    Thanks,

    ---Karl

  • I take it you control the download process.

    Why not invalidate the configuration as the first step?  Impossible version, bad CRC....

    Robert