Hi all, I'm trying to figure out how to switch my Teensy3 from the "standard" EEPROM setup Paul provides to a custom one. The standard setup is that the 2KB Flexram and 32KB of FlexNVM are used together to provide 2KB of EEPROM. I wanted to switch to have 8KB of Data Flash and then use the other 24KB of data flash as backup for 2KB of EEPROM. I got all the code written to do this. The initialization involved reading the Data IFR "resource" to find out the previous program partition setup and then reprogramming it as needed. Seemed pretty reasonable to do (like I do a lot I looked at code from the Freescale MQX RTOS that has support for huge amounts of features on the Teensy processor).
I went to run it and hit the problem that you can't change the program partitioning unless it has been erased first. So, to change the partitioning you need to do a full chip erase prior to loading running your new program. And that would be fine if I could just figure out how to do a full flash erase. From what I've seen on the forum Teensy loader used to do a full chip erase since that was "safest". But that post was over a year ago. I think the loader now does something different and doesn't erase the whole chip. That's good if you are doing "normal" app development and want to have EEPROM data saved across reloads (a nice feature). But it's not clear how you can ever change the setup without doing something like loading a special program that triggered an "erase all" -- killing the board. And then using the loader again to load the real program that would then be able to set a new configuration since there was a clean slate to work with -- at least I'm hoping that would be the case.
So is there any easier way anybody knows of to erase everything so you could make partitioning changes? I'm guessing this is a Paul question?
Thanks for any suggestions! Fred
I went to run it and hit the problem that you can't change the program partitioning unless it has been erased first. So, to change the partitioning you need to do a full chip erase prior to loading running your new program. And that would be fine if I could just figure out how to do a full flash erase. From what I've seen on the forum Teensy loader used to do a full chip erase since that was "safest". But that post was over a year ago. I think the loader now does something different and doesn't erase the whole chip. That's good if you are doing "normal" app development and want to have EEPROM data saved across reloads (a nice feature). But it's not clear how you can ever change the setup without doing something like loading a special program that triggered an "erase all" -- killing the board. And then using the loader again to load the real program that would then be able to set a new configuration since there was a clean slate to work with -- at least I'm hoping that would be the case.
So is there any easier way anybody knows of to erase everything so you could make partitioning changes? I'm guessing this is a Paul question?
Thanks for any suggestions! Fred