mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 08:38:36 -04:00
HAL_ChibiOS: avoid unnecessary H7 flash writes
This commit is contained in:
parent
8dabd6cefc
commit
74f33d57c5
@ -448,7 +448,8 @@ static bool stm32_flash_write_h7(uint32_t addr, const void *buf, uint32_t count)
|
||||
}
|
||||
stm32_flash_unlock();
|
||||
while (count >= 32) {
|
||||
if (!stm32h7_flash_write32(addr, b)) {
|
||||
if (memcmp((void*)addr, b, 32) != 0 &&
|
||||
!stm32h7_flash_write32(addr, b)) {
|
||||
return false;
|
||||
}
|
||||
// check contents
|
||||
|
Loading…
Reference in New Issue
Block a user