1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-29 14:52:12 +01:00

f4 bl_helper: clear all flash errors as we unlock the flash

Error flags being set were causing flash erase operations to
fail.  Not sure why these flags were set though so this might
be hiding some other problem.
This commit is contained in:
Stacey Sheldon 2012-03-05 22:35:02 -05:00
parent 4ea1156e7b
commit 6832a62872

View File

@ -44,6 +44,7 @@ uint8_t *PIOS_BL_HELPER_FLASH_If_Read(uint32_t SectorAddress)
uint8_t PIOS_BL_HELPER_FLASH_Ini()
{
FLASH_Unlock();
FLASH_ClearFlag(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR | FLASH_FLAG_PGAERR | FLASH_FLAG_PGPERR | FLASH_FLAG_PGSERR);
return 1;
}