Skip to content

Commit

Permalink
AP_Bootloader: check ecc error flags only in Flash Status registers
Browse files Browse the repository at this point in the history
  • Loading branch information
bugobliterator committed Jul 25, 2024
1 parent 478d26d commit f37af7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tools/AP_Bootloader/support.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,11 +553,11 @@ void check_ecc_errors(void)
}
uint32_t ofs = 0;
while (ofs < BOARD_FLASH_SIZE*1024) {
if (FLASH->SR1 != 0) {
if (FLASH->SR1 & (FLASH_SR_SNECCERR | FLASH_SR_DBECCERR)) {
break;
}
#if BOARD_FLASH_SIZE > 1024
if (FLASH->SR2 != 0) {
if (FLASH->SR2 & (FLASH_SR_SNECCERR | FLASH_SR_DBECCERR)) {
break;
}
#endif
Expand Down

0 comments on commit f37af7c

Please sign in to comment.