I hate to ask this, but is there a trick to using port R bits 1-0 as GPIO on the Xplained Pro for the ATxmega128A1U?
Looking at the Xplained Pro schematic, it appears PR0 & PR1 are not used by any circuitry on the board, and are directly available on one of the external connectors. I can see the port R0 & R1 pins coming off of the MCU on pins 91 & 92, labeled PR0_GPIO and PR1_GPIO. They go into a bus structure, and exit in a group of signals that go to connector EXT1, where they are renamed to PIN9_IRQ/GPIO and PIN10_SPI_SS_B/GPIO. A couple pages down the EXT1 signals are wired to a physical connector, J200. As you would expect, the signals are indeed on pins 9 and 10.
I tried writing to the PORTR_DIR and PORTR_OUT registers - I can see the DIR and OUT bits being set in the debugger under the PORTR tab, but the actual port pins do not change - they remain high impedance. I verified this by directly probing the MCU pins 91 & 92. It's as if there is some other function that is preventing the use of port R. Coming out of reset, I initialize the stack pointer and then configure the ports, so it doesn't appear to be anything I am doing.
I really need the port R bits to be outputs. If anyone has resolved this, I would love to hear about it. Thank you!