Bootloader idea.....possible?
WBA Consulting
Posts: 2,935
We have a product we make at work that utilizes an MSP430 processor that has 3 firmware sets programmed into it. To cycle between the firmware programs, you cycle power X amount of times. IE: Cycle power 1, 2, or 3 times and it runs the default program. Cycle power 4 times and it runs a diagnostic firmware. (the 4 times guarantees it is not reset by accident in the field and ends up in diagnostic mode).
Anyhow, I thought of using this method for the prop, since it only requires a power switch to select what program it runs. Here are my thoughts on the bootloader, but would it work?
1) Load EEPROM with bootloader program
2) Upon power up, a counter value is incremented in a location on the EEPROM
3) Config LED is lit and X amount of time passes (this is where the power cycle would need to occur)
4) Config LED is turned off, Counter value in EEPROM is set as program number, and EEPROM counter value is set back to 1
5) Program number is loaded from SD and ran (1=default)
So, if you power cycle the unit (or hit reset) while the config LED is lit one time, the counter value would be 2 and the 2nd program would be ran from the SD.
Another idea is to use a 128K EEPROM and store multiple programs in the upper area. Is that possible also?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andrew Williams
WBA Consulting
PowerTwig Dual Output Power Supply Module
My Prop projects: Reverse Geo-Cache Box, Custom Metronome, Micro Plunge Logger
Anyhow, I thought of using this method for the prop, since it only requires a power switch to select what program it runs. Here are my thoughts on the bootloader, but would it work?
1) Load EEPROM with bootloader program
2) Upon power up, a counter value is incremented in a location on the EEPROM
3) Config LED is lit and X amount of time passes (this is where the power cycle would need to occur)
4) Config LED is turned off, Counter value in EEPROM is set as program number, and EEPROM counter value is set back to 1
5) Program number is loaded from SD and ran (1=default)
So, if you power cycle the unit (or hit reset) while the config LED is lit one time, the counter value would be 2 and the 2nd program would be ran from the SD.
Another idea is to use a 128K EEPROM and store multiple programs in the upper area. Is that possible also?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andrew Williams
WBA Consulting
PowerTwig Dual Output Power Supply Module
My Prop projects: Reverse Geo-Cache Box, Custom Metronome, Micro Plunge Logger
Comments
You don't need any kind of special bootloader to make this work. You just need a single program with a decision tree at the beginning to select the proper action.
-Phil