Trouble with GPIO_PinInit()

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

Trouble with GPIO_PinInit()

767 Views
tcwong
Contributor III

I want to use the function GPIO_PinInit to initialize the PTA7 (located in GPIOA). I am using GPIO_PinInit(GPIOA, 7u, &output_config) and I keep getting errors. I already have output_config defined with

gpio_pin_config_t = {

kGPIO_DigitalOutput,

0,

}'

What am I missing? The issue seems to be with GPIOA part of my function.

0 Kudos
3 Replies

637 Views
FelipeGarcia
NXP Employee
NXP Employee

Hello Tyler,

 

Could you please specify the MCU you are working on? Also, I need to know the errors you are having. Could you please attach a snippet?

 

Best regards,

Felipe

0 Kudos

637 Views
tcwong
Contributor III

Hello Felipe,

I actually figured out the issue I was having. The first part of the function I should have been using kPGIO_PORTA from the SDK i downloaded. Thanks for trying to help though!

Best,

Tyler

0 Kudos

637 Views
marek-trmac
NXP Employee
NXP Employee

Hi Tyler,

just a note - there is also supported Pins tool allowing to generate pins configuration for you. The Pins tool cis integrated directly in MCU IDE or available in standalone MCUXpresso Config Tools.

Regards

Marek

Regards,
Marek
0 Kudos