mirror of https://github.com/ArduPilot/ardupilot
AP_Bootloader: check ecc error flags only in Flash Status registers
This commit is contained in:
parent
60c2e4278c
commit
d8df0b716d
|
@ -553,11 +553,11 @@ void check_ecc_errors(void)
|
||||||
}
|
}
|
||||||
uint32_t ofs = 0;
|
uint32_t ofs = 0;
|
||||||
while (ofs < BOARD_FLASH_SIZE*1024) {
|
while (ofs < BOARD_FLASH_SIZE*1024) {
|
||||||
if (FLASH->SR1 != 0) {
|
if (FLASH->SR1 & (FLASH_SR_SNECCERR | FLASH_SR_DBECCERR)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#if BOARD_FLASH_SIZE > 1024
|
#if BOARD_FLASH_SIZE > 1024
|
||||||
if (FLASH->SR2 != 0) {
|
if (FLASH->SR2 & (FLASH_SR_SNECCERR | FLASH_SR_DBECCERR)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue