Hi Vishal Roy,
The default pad configurations out of reset are as follows. You need to reconfigure it according to your needs.
4.4 Default pad state.png
PORTC_PCR5[MUX] should reconfigure to 001: Alternative 1 (GPIO)
4.5 Signal Multiplexing sheet.png
12.5.1 Pin Control Register n (PORT_PCRn).png
You can also use the Processor Expert to configure it.
configure GPIO Processor Expert.png
I have set as below
PORTC->PCR |= PORT_PCR_MUX(1) /* Port C5: MUX = GPIO */
PTC->PDDR |= 1u <<5u; // Port C5: Data Direction= output 1b - Pin is configured as general-purpose output, for the GPIO function.
PTC->PCOR |= 1u <<5u; //Port Clear Output Register (PCOR) 1b - Corresponding bit in PDORn is cleared to logic 0.
But with no toggle on GPIO line
Do i have to set the Lock Bit as well to "0"
Do let me know if I am missing any other configuration as this line is MuX with JTAG line and by default is a JTAG pin