cancel
Showing results for 
Search instead for 
Did you mean: 

EEprom writing issue

Chayan Roy
Associate III
Posted on April 12, 2017 at 10:17

Hello,

I am trying to write value 7 to eeprom data memory area. My code is below..

/* MAIN.C file

 *

 * Copyright (c) 2002-2005 STMicroelectronics

 */

#include 'STM8S003F3P.h'

 unsigned int *ptr=(unsigned int *)0X4000;

 

main()

{

while (1){

if(!(FLASH_IAPSR & (1<<3))){

                            

                            FLASH_DUKR=0XAE;

                            FLASH_DUKR=0X56;

                            

                            *ptr++=7;

                            FLASH_IAPSR &=~(1<<3);

                            

                            

                            

                            }

}

}

But there is no value  written to eeprom. Further please let me  know how to chek  eeprom data in stvd or stvp .

1 REPLY 1
Simon V.
ST Employee