#include "avr/io.h" uint8_t appdata_0 __attribute__((address (0x8F00))); uint8_t appdata_1 __attribute__((address (0x8F01))); uint8_t appdata_2 __attribute__((address (0x8F02))); uint8_t testvar; int main (void) { testvar = 0x45; appdata_0 = 0xAB; appdata_1 = 0xCD; appdata_2 = testvar; CPU_CCP = CCP_SPM_gc; NVMCTRL.CTRLA = 0x03; // ERWP Erase and write page (NVMCTRL.ADDR selects which memory) USERROW.USERROW1 = 0x11; USERROW.USERROW2 = 0x22; USERROW.USERROW3 = testvar; CPU_CCP = CCP_SPM_gc; NVMCTRL.CTRLA = 0x03; // ERWP Erase and write page (NVMCTRL.ADDR selects which memory) while(1) { } }