Can a pin be GPIO output and input at the same time?
Your question was already answered on the datasheet, page 25. "When a pin is configured as both a general-purpose input and output, the primary function is as an output pin. This configuration allows the status of the output pin
to be determined by reading the GPIO read configuration
register"