I'd like to use the internal flash to store these data, I'm using a STM32F103, so I don't want to attach a serial EEPROM or something. These parameters will not change for several months, eventually, it will, so internal flash seems a good option. STM32F103 has 128 pages(some 64 pages) with 1Kb each, so don't need to erase a big sector on writing.
I reserved the sectors on flash:
First 8KB bootloader, DAPBoot
Second 8KB Virtual EEPROM
The rest to Chibios app
Code: Select all
boot : org = 0x08000000, len = 8K
flash0 : org = 0x08004000, len = 112K
eeprom : org = 0x0801E000, len = 8K
I'm using a "driver" to write to flash, that I borrow from BOOTLOADER. So far so good.
I found out that Chibios has MFS, but using external flash chips, is there anyone that tried using internal flash? Is that a bad decision? Seems trivial to use it, just point functions to config and good to go.
In the weekend I'll try to workout something, but if is there anything that could go wrong, would be good to know in advance...