How to enable GPIOs which are DISABLED after reset

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

How to enable GPIOs which are DISABLED after reset

Jump to solution
805 Views
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 Kudos
1 Solution
672 Views
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

View solution in original post

0 Kudos
4 Replies
672 Views
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 Kudos
672 Views
VictorLorenzo
Contributor IV

Hi Sabina,

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

Regards,

0 Kudos
672 Views
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 Kudos
673 Views
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 Kudos