AnsweredAssumed Answered

EEprom writing issue

Question asked by Chayan Roy on Apr 12, 2017
Latest reply on Apr 14, 2017 by Simon V.

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 .

Outcomes