Digi ME device

I am trying to get an application running on both the Digi ConnectME and a Core9c. I am having some problems with getting the ME GPIO working, when I use the NAsetGPIOpin() function. I have changed to definitions in gpio.h so that the Serial port is defind as a 2 wire port, and have also changed the definitions for the 5 GPIO pins so that they are initialised as outputs. The values in the PORTA control register are 0x88E70098.

As I understand it the 0x88 means that PA7 and PA3 are set to special function(i.e. serial port)and all othe lines are set to GPIO. The 0xE7 indicates that PA3 and PA4 are inputs and the rest are outputs, as expected.

When I call NAsetGPIOpin() to set PA2(GPIO3) it works correctly. With PA0, PA1, PA5 and PA6 it returns an error code of -2 which is NA_GPIO_INVALID_SETUP, so it seems to think that the pin is set to an input or is a special function.

Any help with what is happening here would be appreciated.