I'm trying write to xmega eeprom memory mapped, but not successful.
ldi Temp, NVM_EEMAPEN_bm; Enable EEPROM Memory Mapping sts NVM_CTRLB, Temp ldi R16, 0xA0 ldi R17, 0xA1 LDI YH, $10 LDI YL, $00 ST Y+, R16 ; Value 1 in first address ST Y, R17 ; value 2 second address NVMBusy0: LDS Temp, NVM_STATUS SBRC Temp, 7 RJMP NVMBusy0 LDI Temp, $00 STS NVM_ADDR0, Temp LDI Temp, NVM_CMD_ERASE_WRITE_EEPROM_PAGE_gc STS NVM_CMD, Temp LDI Temp, $D8 STS CPU_CCP, Temp LDI Temp, $01 STS NVM_CTRLA, Temp NVMBusy1: ; wait just for test LDS Temp, NVM_STATUS SBRC Temp, 7 RJMP NVMBusy1
After that eeprom values not changing ( maybe some bug in simulator ? )
I'm searched a lot last days, but not interesting found.
Can anyone help me? I'm writing in AVR Studio assembler.