STM32C0 rewrite flash without erase
Hey all,
I'm trying to get embedded Lua (https://eluaproject.net/) running on an STM32C0 MCU. The implementation has a Write Once Filesystem that uses flash and can be appended to but not modified.
The issue is that the WOFS relies on being able to write bits in flash as 0xFF or 1s with the expectation that it will be able to write over them later to set them to 0s (obviously not vice versa) For instance an 8 byte (smallest size supported by this flash?) write to address A with data FF FF FF FF 01 23 45 67, then later another write to address A with data AA FF FF FF 01 23 45 67. I think this is used to set flags on old files, like "deleted", and also to deal with the fact that the FS is designed around 4 byte, not 8 byte alignment.
This seems like it would be possible from a hardware perspective but HAL_FLASH_Program errors when I try it, is this something that is possible? Thank you!
