[STM32F4] Fix flash erase voltage range
Updates the flash driver to use 2.7-3.6V range when erasing, which should
be compatible with the 3.3V voltage present on most Discovery and Nucleo
boards, this way erases happen with a granularity of 32-bit, instead of
the previosly used 8-bit granularity.
@@ -198,7 +198,7 @@ stm32_flash_erase_sector(const struct hal_flash *dev, uint32_t sector_address)
#endif
eraseinit.Sector = i;
eraseinit.NbSectors = 1;
- eraseinit.VoltageRange = FLASH_VOLTAGE_RANGE_1;
+ eraseinit.VoltageRange = FLASH_VOLTAGE_RANGE_3;
err = HAL_FLASHEx_Erase(&eraseinit, &SectorError);
if (err) {
