Skip to main content
Associate III
October 13, 2023
Solved

clock cycles needed for eeprom write

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?

 

This topic has been closed for replies.
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
October 23, 2023

Use a TIM counting off micro-seconds to measure the time across the functions. Or toggle a GPIO and scope it

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..

6 replies

TDK
October 13, 2023

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.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Piranha
Principal III
October 14, 2023

Ironically that time is about 10 to 100 times worse than for a software EEPROM emulation or a proper storage system in FLASH memory.

Associate III
October 23, 2023

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( );