Thanks in advance for any information about the purpose of the GPIO registers in the XMega.
Field the chicken, ignore the ball.
They are there for you do whatever you like with. As the are in the very low address space they are reachable with the SBi and CBI opcodes which makes them perfect for storing bit level (boolean) variables.
In tiny/mega there used to be just three: GPIOR0, GPIOR1, GPIOR2 and only GPIOR0 was in SBI/CBI range allowing for just 8 such bit variables.
Meanwhile Xmega have LOADS of the things. In fact I'd say "too many". You don't need that many fast access variables in most programs and meanwhile you only get to use four virtual ports.. It would have been far better if Atmel had given half as many GPIOR registers and doubled the number of virtual ports to 8.
Ah. Thanks much.
© 2020 Microchip Technology Inc.