K82: ConfigTools and Gpio pin C3/B8

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

K82: ConfigTools and Gpio pin C3/B8

475 Views
EugeneHiihtaja
Senior Contributor I

Hello !

I'm using embedded config tool in MCUExpresso and try to create Z-state init for PORTC3 pin.

It is possible to PORTC4 by selection  "n/a, disabled" state in table , but for PortC3 this state is not available and only LLWU there.

/* PORTC3 (pin B8) is configured as LLWU_P7 */
PORT_SetPinMux(PORTC, 3U, kPORT_MuxAsGpio); // ?

/* PORTC4 (pin A8) is disabled */
PORT_SetPinMux(PORTC, 4U, kPORT_PinDisabledOrAnalog);  // OK 

Can I do this manually or this pin state is really not available and have sense to create normal input pin with No init in all cells.

I have tried like this but still configurator put kPORT_MuxAsGpio parameter.

What I should do ?

Regards,

Eugene

0 Kudos
2 Replies

359 Views
mjbcswitzerland
Specialist V

Eugene

PTC3 doesn't have a disabled mode since its ALT0 setting (default) is CMP1_IN1.

However, if you want this to be HI-Z you don't need to do anything because CMP1_IN1 is already an input and thus high impedance. You could however also set it to GPIO mode (ALT1) so that it is PTC3/LLWU_P7 and as long as it is left as an input (without pull-up/down it will also be high impedance.

Regards

Mark

0 Kudos

359 Views
EugeneHiihtaja
Senior Contributor I

Hi Mark !

Yes CMP1_IN1 settings via Config tools bring desired configuration:

/* PORTC3 (pin B8) is configured as CMP1_IN1 */
PORT_SetPinMux(PORTC, 3U, kPORT_PinDisabledOrAnalog);

/* PORTC4 (pin A8) is disabled */
PORT_SetPinMux(PORTC, 4U, kPORT_PinDisabledOrAnalog);

No idea why I haven't try this configuration :smileyhappy:

Regards,

Eugene

0 Kudos