Question
DATA EEPROM area - problem writing byte
Posted on July 12, 2011 at 13:13
Hi experts,
in my application I am trying to write a single byte to an address in the DATA EEPROM area immediately after disabling ''the DATA area write protection by writing consecutively .. MASS keys to the FLASH_DUKR register''.--> But writing will be ignored!! Inserting at least one instruction after writing the MASS keys solves the problem.Code:
... FLASH_DUKR = 0xAE; FLASH_DUKR = 0x56; *DATA_EEPROM_destination = char_value;From the Disassembler:
....... eep.c:226 FLASH_DUKR = 0xAE; 0x8db2 0x35AE5064 MOV _FLASH_DUKR,#0xae eep.c:227 FLASH_DUKR = 0x56; 0x8db6 0x35565064 MOV _FLASH_DUKR,#0x56 eep.c:231 *DATA_EEPROM_destination = char_value; 0x8dba 0x7B01 LD A,(0x01,SP) 0x8dbc 0xF7 LD (X),A ........ The problem does not to appear always, but I can't see any principle :o( Any ideas??? Regards, WoRo BTW: can anybody help me? How canfind
related discussions by search function in this ****** forum???