From AVR instruction set manual:
In some parts the Flash Memory has been mapped to the data space and can be read using this command (LD, ...)
This property is present for eeprom in XMEGA but I cannot find any part with mapped flash.
From AVR instruction set manual:
In some parts the Flash Memory has been mapped to the data space and can be read using this command (LD, ...)
This property is present for eeprom in XMEGA but I cannot find any part with mapped flash.
The comment there is actually talking about the "brain dead" Tiny chips (4,5,9,10,20,40).
A very special thanks to the great cliff clawson.
From AVR instruction set manual:
LDS (16-bit) – Load Direct from Data Space
...
In some parts the Flash memory has been mapped to the data space and can be read using this command.
...
Memory access is limited to the address range 0x40..0xbf.
Flash memory address begins from 0x4000 in tiny chips and 16 bit LDS/STS cannot access this range. So in what part(s), 16 bit LDS/STS can access flash memory?
0x4000 in tiny chips and 16 bit LDS/STS cannot access this range.
As 0x4000 fits nicely into 16 bits, why do you say "cannot"?
Aahh, I see a bit of your confusion. There are two forms of LDS, the short form and the long form. You quoted from the short form. The long form has a full 16-bit address. And the long form description doesn't mention flash.
Aahh, again--my toolchain (CodeVision) generated LD instructions to make the accesses in a test program with Tiny40 target.
Perhaps the short-form LDS is tailored for I/O memory--I'd have to look at the memory map. And perhaps, indeed, the long-form LDS isn't used for flash access? (I'd need a more elaborate test program; the compiler optimizes the heck out of a very simple one.)