Init_GPIO

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Init_GPIO

跳至解决方案
2,497 次查看
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

标签 (1)
1 解答
2,170 次查看
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!

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

在原帖中查看解决方案

6 回复数
2,170 次查看
arnaldogomes
Contributor III

Hello Xin!

Thanks

Regards,

Arnaldo

0 项奖励
回复
2,170 次查看
BlackNight
NXP Employee
NXP Employee

Hi Arnaldo,

yes, see below:

pastedImage_0.png

Erich

0 项奖励
回复
2,170 次查看
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 项奖励
回复
2,170 次查看
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 项奖励
回复
2,170 次查看
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 项奖励
回复
2,171 次查看
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!

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