File tree 1 file changed +10
-0
lines changed
libraries/EEPROM/src/utility
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -235,8 +235,12 @@ void eeprom_buffer_flush(void)
235
235
uint32_t pageError = 0 ;
236
236
#if defined(FLASH_TYPEPROGRAM_QUADWORD )
237
237
uint64_t data [2 ] = {0x0000 };
238
+ #else
239
+ #if defined(STM32U3xx )
240
+ uint32_t dataAddr = 0 ;
238
241
#else
239
242
uint64_t data = 0 ;
243
+ #endif
240
244
#endif
241
245
242
246
/* ERASING page */
@@ -261,10 +265,16 @@ void eeprom_buffer_flush(void)
261
265
if (HAL_FLASH_Program (FLASH_TYPEPROGRAM_QUADWORD , address , (uint32_t )data ) == HAL_OK ) {
262
266
address += 16 ;
263
267
offset += 16 ;
268
+ #else
269
+ #if defined(STM32U3xx )
270
+ dataAddr = (uint32_t )((uint8_t * )eeprom_buffer + offset );
271
+
272
+ if (HAL_FLASH_Program (FLASH_TYPEPROGRAM_DOUBLEWORD , address , dataAddr ) == HAL_OK ) {
264
273
#else
265
274
data = * ((uint64_t * )((uint8_t * )eeprom_buffer + offset ));
266
275
267
276
if (HAL_FLASH_Program (FLASH_TYPEPROGRAM_DOUBLEWORD , address , data ) == HAL_OK ) {
277
+ #endif
268
278
address += 8 ;
269
279
offset += 8 ;
270
280
#endif
You can’t perform that action at this time.
0 commit comments