MKL02Z16VFK4 PTB2 pin assignment and default state

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MKL02Z16VFK4 PTB2 pin assignment and default state

477 Views
clivepalmer
Contributor III

Hi,

I have just started using the Freescale MKL part. I want to be able to disable and enable my UART0 TX, leaving the pin in a disabled state when disabled. I am using the MKL02Z16VFK4. I am using PTB2 for my UART0 TX functionality. From the reference manual I believe PTB2 pin assignment default state is ADC0_SE4 out of reset. Am I correct in assuming that I cannot disable this pin functionality using MUX(0) and that this will only set the pin back to  ADC0_SE4 functionality? If I configure the pin as UART0 TX i.e. MUX(3) then is disabling the TX with the TE bit sufficient and the only disable option? What state is the pin left in if I do this?

Thanks

Clive

Labels (1)
2 Replies

386 Views
mjbcswitzerland
Specialist V

Clive

Move between MUX(1) and MUX(3) to control the pin state.

In MUX(1) it is GPIO so you can set it up to drive '0' or '1' or be an input with a pull-up/down. In MUX(3) it is UART0 TX -> switch between the 2 MUX() modes should be all that is needed; TE can be left on but any data sent in this state will be lost since it won't appear on the pin.

Regards

Mark

386 Views
clivepalmer
Contributor III

Thanks Mark. In the end that is what I did. I set MUX(1) for GPIO and the PDDR as an input.

0 Kudos