- Fix Writing H7B0
This commit is contained in:
Nima Askari (نیما عسکری) 2024-04-14 14:08:21 +02:00 committed by GitHub
parent 365ebe8fda
commit baf052fe31
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

4
ee.c
View File

@ -337,14 +337,14 @@ bool EE_Write(bool FormatFirst)
data += 16; data += 16;
} }
#elif (defined FLASH_TYPEPROGRAM_FLASHWORD) #elif (defined FLASH_TYPEPROGRAM_FLASHWORD)
for (uint32_t i = 0; i < eeHandle.Size; i += 32) for (uint32_t i = 0; i < eeHandle.Size; i += FLASH_NB_32BITWORD_IN_FLASHWORD * 4)
{ {
if (HAL_FLASH_Program(FLASH_TYPEPROGRAM_FLASHWORD, EE_ADDRESS + i, (uint32_t)data) != HAL_OK) if (HAL_FLASH_Program(FLASH_TYPEPROGRAM_FLASHWORD, EE_ADDRESS + i, (uint32_t)data) != HAL_OK)
{ {
answer = false; answer = false;
break; break;
} }
data += 32; data += FLASH_NB_32BITWORD_IN_FLASHWORD * 4;
} }
#endif #endif