AnsweredAssumed Answered

Frdm-k64g Gpio Issue

Question asked by Alejandro Velez on Jan 11, 2017
Latest reply on Jan 12, 2017 by Mark Butcher

Hello... I need to toggle some of the FRDM-K64F GPIO pins. One of those pins is in the PTA port, the PTA2 pin, but I can't set it to  logic '1', it's always at 0V and I need to set it to it's logic '1' state of 3.3V. I have tried a baremetal code, I can set other pins except this one. The pins is shared with the JTAG_TDO and I think that's the reason. Can I get this pin to work as GPIO??

Thanks

 

Here's my initialization code:

 

SIM_SCGC5 |= SIM_SCGC5_PORTA_MASK;         //Enable clock

PORTA_PCR2 |= PORT_PCR_MUX(1) | PORT_PCR_DSE_MASK;   //Chose alt1 as gpio pin and enable drive strenght

GPIOA_PDDR |= (1<<2);   //Set the pin as output

 

GPIOA_PSOR |= (1<<2);   //To set the pin at logic '1' but doesn't work

Outcomes