R6000 PC2 always is alternate function

On the R6000, I use PC3 as the serial TXC port. PC2 is set as normal function. However, when the serial port C is opened, PC2 suddenly becomes TXC. What’s going on? Anyone seen this happen?

The code:
WrPortI (PCDDR, &PCDDRShadow, PCDDRShadow | 0x0F); //PC[3:0] outputs.
WrPortI (PCDCR, &PCDCRShadow, PCDCRShadow & 0xF0); //PC[3:0] totem pole outputs.
WrPortI (PCALR, &PCALRShadow, PCALRShadow & 0x3F); //PC[3] is TXC.
BitWrPortI (PCFR, &PCFRShadow, 1, 3); //PC[3] is alternate function.
//Okay to here, PC2 can be toggled. Then…
serCopen (9600); //and PC2 becomes TXC.

The default pins used by RS232.lib for serial port C are pins PC2 and PC3. There are macros that you can use to change the pins that serial port C uses. See the function description for serCopen()

Thanks! As you said and the function help stated, serCopen() assigns PC2 and PC3 to TXC. Could have used the macros but I chose an explicit assignment to help make future debugging clearer:

BitWrPortI (PCFR, &PCFRShadow, 0, 2); //PC[2] is NOT alternate function.