STM32 gotchas
98. FLASH is erased to 0x00 rather than to 0xFF in 'L0 and 'L1

FLASH (as well as its predecessors, EPROM and EEPROM) is traditionally erased to all-ones state (i.e. after erasing FLASH, all bytes are 0xFF). This is not a necessity, just a custom, and in some cases this convention is simply not used.

In the world of STM32, the STM32L1xx and STM32L0xx families are the exception, where FLASH is erased to all-zero state (i.e. after erasing FLASH, all bytes are 0x00). These two families feature also a portion of FLASH which behaves like EEPROM, i.e. can be erased/rewritten byte-wise.

Why did ST decide for this unusual step is unknown. Sure, formally the particular erased state does not matter, but it is a surprise nonetheless, and care must be exercised when algorithms potentially depending on the value of erased FLASH (e.g. internal-FLASH-based file systems) are ported from different STM32 families to these two families.