I noticed several desyncs between datasheet and header on the XMEGA as well. I assume the datasheet is correct and the header is lacking. Easy enough to correct, put the missing lines into your own header.
Likewise, I found some lines that are probably from the A series (XMEGA64A1 or such) that aren't present in the D series I was using. These can be removed with #undef.
Mind, for portability, you want to put the device-specific defines into a device-specific section, and not use them otherwise. Use the IO header's def to detect this (put an #ifdef _AVR_ATmega4809_H_ ... #endif, or whatever it is, around the section).
Example, the D3 version has the register ADCA.CH0.SCAN (0x226) which is missing from the header. Observe the following log:
Active Load, by Tim Williams, Jun 21 2018
Commands:
Any key Start console interface
? Display this message
R <sram> [byte] RAM <read>/[write] addr
S <reg> [val] SPI <read>/[write] reg
I Initialize LCD (SPI)
C Clear LCD (SPI)
G Play Raycaster
>r 226
RAM at: 226h = 45h
>r 226 0
Write: (226h) <= 0h
>r 226
RAM at: 226h = 0h
>r 226 ff
Write: (226h) <= ffh
>r 226
RAM at: 226h = 9fh
>r 226
RAM at: 226h = 7fh
>r 226
RAM at: 226h = afh
>r 226 45
Write: (226h) <= 45h
>r 226
RAM at: 226h = 45h
>r 226
RAM at: 226h = 55h
>r 226
RAM at: 226h = 25h
I have a RAM read/write function on the serial console, making it easy to verify things like this.
As it happens, the ADC is running, so the high bits are cycling in hardware. That's why the read is inconsistent, it depends on what time I hit enter. The low bits are static.
It's certainly not zero, as you might expect from it being unlisted in the header; for example, 0x227 is a reserved port, and is dead on the bus:
>r 227
RAM at: 227h = 0h
>r 227 ff
Write: (227h) <= ffh
>r 227
RAM at: 227h = 0h
>
Writing 0xff into the port does nothing, it remains 0.
I do wonder how many reserved ports are actually implemented (i.e., undocumented ports), suppose I could make a table and do a scan some time.
Tim