What is simpler than to write from ram to flash? And still I managed to screw up things somehow: First 9 bytes in the beginning of some pages are copy of these bytes of the very first page. Size of page is 0x40, flash is written one page per time, *not* byte per time, so how it is possible to corrupt only 9 first bytes? I'm genius.
#avr #AtMega8
Partial success. In brief: in the reference example of the program for writing to flash (p. 212 of the #AtMega8 datasheet) there is a line: ``sbci ZH, high(PAGESIZEB) ; not required for PAGESIZEB<=256'' That's a bullshit
This instruction is needed regardless of page size. How scary to live if you can not believe the datasheets.