Init_GPIO

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

Init_GPIO

Jump to solution
1,084 Views
arnaldogomes
Contributor III

Hi guys!

Using "Init_GPIO" it is possible to set pull-up or pull-down resistor in KDS V3.0.0?

Regards

Labels (1)
1 Solution
757 Views
TICS_Fiona
NXP Employee
NXP Employee

Hi Arnaldo

I checked in latest CodeWarrior version v10.6.6, it does not support “Pull Selection” either.

. PE.png

Pin Control Register contains the bit PS(Pull Select), however, this bit is read only for pins that do not support a configurable pull resistor direction.  Please see the description for PORTx_PCRn in Reference Manual. 

KL25 has pull-enable control, but only to enable pull-ups (pull-down for PTA0). Pull select is not available at any port. Please also open KL25 Reference Manual, go to the Chip Configuration Chapter->Human Machine Interfaces->GPIO configuration->Port control and interrupt summary Section.

pull.png

Best Regards

Fiona Kuang

TIC - Technical Information Center

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Mark Correct button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

View solution in original post

6 Replies
757 Views
arnaldogomes
Contributor III

Hello Xin!

Thanks

Regards,

Arnaldo

0 Kudos
757 Views
BlackNight
NXP Employee
NXP Employee

Hi Arnaldo,

yes, see below:

pastedImage_0.png

Erich

0 Kudos
757 Views
arnaldogomes
Contributor III

Hi Erich!

Thank you for your time.

I tried to build a simple example with FRDM-KL25Z board. But when I set "Init_GPIO" (see bellow) exist just three options (Pin direction, Output value and Pull resistor).

pastedImage_3.png

Probably I made some mistake. How do I have other options?

Could you help me?

Regards,

Arnaldo

0 Kudos
757 Views
BlackNight
NXP Employee
NXP Employee

Hi Arnaldo,

the KL25Z only has pull-ups available in the hardware, so you don't have a choice to select pull-up or pull-down.

Erich

0 Kudos
757 Views
arnaldogomes
Contributor III

Hello Erich!

In other post (https://community.freescale.com/thread/327975) you indicated this link: https://mcuoneclipse.com/2012/11/12/tutorial-bits-and-pins-with-kinetis/

The author used CodeWarrior 10.3 according to my understanding of the post, is possible to configure pull-up or pull-down. The topic 11.5.1 in KL25Z Reference Manual we have PS (Pull Select) registry responsible for setting.

Knowing that the processor is the same I don't understand because in CodeWarrior has this option (Pull Select) and in the KDS don't have!

Regards,

Arnaldo

0 Kudos
758 Views
TICS_Fiona
NXP Employee
NXP Employee

Hi Arnaldo

I checked in latest CodeWarrior version v10.6.6, it does not support “Pull Selection” either.

. PE.png

Pin Control Register contains the bit PS(Pull Select), however, this bit is read only for pins that do not support a configurable pull resistor direction.  Please see the description for PORTx_PCRn in Reference Manual. 

KL25 has pull-enable control, but only to enable pull-ups (pull-down for PTA0). Pull select is not available at any port. Please also open KL25 Reference Manual, go to the Chip Configuration Chapter->Human Machine Interfaces->GPIO configuration->Port control and interrupt summary Section.

pull.png

Best Regards

Fiona Kuang

TIC - Technical Information Center

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Mark Correct button. Thank you!

-----------------------------------------------------------------------------------------------------------------------