cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L151 MD: duplicate byte on EEPROM write

ochebaro
Associate
Posted on January 14, 2015 at 15:51

I a facing a problem writing to eeprom using DATA_EEPROM_ProgramByte

what I noticed is that my byte gets duplicated and I end up with n+1 bytes written where it is supposed to write only n bytes

 

I am using  the lib stm32l1xx_flash.c V1.2.0

My code looks like:

DATA_EEPROM_Unlock();

DATA_EEPROM_FixedTimeProgramCmd( ENABLE );

    

for( ; size > 0; size-- )

{

        DATA_EEPROM_ProgramByte( ( u32_t )pt, *p );

        pt++;

        p++;

}

DATA_EEPROM_FixedTimeProgramCmd( DISABLE );

DATA_EEPROM_Lock();

please advice

thanks in advance

#stm32l151-eeprom
0 REPLIES 0