2023-10-13 05:29 AM
Hello ,
i am looking to know for STM32L051 how long will it take a byte to be written in to eeprom.
while writing eeprom does it have any limitations like UART intteruptions?
Solved! Go to Solution.
2023-10-23 03:39 AM
Use a TIM counting off micro-seconds to measure the time across the functions. Or toggle a GPIO and scope it
2023-10-13 12:52 PM
If it's the same as the STM32L1 family (which it probably is), it will not stall the bus unless you read/write to the same bank before the first operation is done.
Datasheet says programming time is 3.94 ms max.
2023-10-13 05:28 PM
Ironically that time is about 10 to 100 times worse than for a software EEPROM emulation or a proper storage system in FLASH memory.
2023-10-23 02:09 AM
The below is the function i use ,
flash_unlock( );
memcpy( &data_w, data_ptr, sizeof( data_w ) );
status = HAL_FLASHEx_DATAEEPROM_Program( TYPEPROGRAMDATA_WORD, Address_Src, INVERTED_DATA( data_w ) );
flash_lock( );
2023-10-23 02:10 AM - edited 2023-10-23 02:14 AM
from the above , does it take longer than 3.94?
2023-10-23 03:39 AM
Use a TIM counting off micro-seconds to measure the time across the functions. Or toggle a GPIO and scope it
2023-10-23 06:44 AM - edited 2023-10-23 06:44 AM
It shouldn't. Measure it, shouldn't stall at all. Not sure if you can lock the flash when a write is in progress.