How to enable GPIOs which are DISABLED after reset

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

How to enable GPIOs which are DISABLED after reset

跳至解决方案
1,087 次查看
VictorLorenzo
Contributor IV

Hi,

I'm creating a project with the MKE04Z64VLD4 microcontroller with MCEXpresso (v10.3.1 [Build 2233]) and its built-in Pins and Clocks tools. I've downloaded the MCUXpresso SDK (2.5.0) from nxp using MCUXpresso SDK Builder.

Problem is I try to use pins 36, 37 (PTC7,PTC6) as GPIO outputs but writing to them has no effect on the pin.

The BOARD_InitPins() function created by the Pins tool includes calls to GPIO_PinInit() for each pin, but calls to GPIO_PinWrite() seem not having effects on the output.

Is there any other step required for using those pins?

Victor

0 项奖励
回复
1 解答
954 次查看
VictorLorenzo
Contributor IV

Hi Mark, thanks for your time and response.

I've tried uTasker as you suggested, but I couldn't manage to make it compile, it had too many things to adjust and modify, so I started again from the very beginning.

Anyway, "haste is a waste", cause is I did not pay attention to schematic drawings.

Regards, Victor

在原帖中查看解决方案

0 项奖励
回复
4 回复数
954 次查看
Sabina_Bruce
NXP Employee
NXP Employee

Hi Victor,

Could you verify if your program includes the BOARD_InitDebugConsole(); in the main.

Let me know,

Sabina

0 项奖励
回复
954 次查看
VictorLorenzo
Contributor IV

Hi Sabina,

No need to check BOARD_InitDebugConsole(). The answer was in my previous response.

Regards,

0 项奖励
回复
954 次查看
mjbcswitzerland
Specialist V

Hi Victor

There is nothing special to be done (apart from avoiding enabling peripheral functions on pins you want to use as GPIO).
If you continue to have problems try the uTasker open source project at https://github.com/uTasker/uTasker-Kinetis since it supports your device and has chip simulation which increases efficiency over generation tools and guessing whether they are correct or not.

Regards

Mark


Complete Kinetis solutions, training and support:http://www.utasker.com/kinetis.html
Kinetis KE:
- http://www.utasker.com/kinetis/FRDM-KE02Z.html
- http://www.utasker.com/kinetis/FRDM-KE02Z40M.html
- http://www.utasker.com/kinetis/FRDM-KE04Z.html
- http://www.utasker.com/kinetis/FRDM-KE06Z.html
- http://www.utasker.com/kinetis/FRDM-KE15Z.html

0 项奖励
回复
955 次查看
VictorLorenzo
Contributor IV

Hi Mark, thanks for your time and response.

I've tried uTasker as you suggested, but I couldn't manage to make it compile, it had too many things to adjust and modify, so I started again from the very beginning.

Anyway, "haste is a waste", cause is I did not pay attention to schematic drawings.

Regards, Victor

0 项奖励
回复