How do I write to GPIO_AD pins on my RT1170?

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

How do I write to GPIO_AD pins on my RT1170?

Jump to solution
747 Views
violkvas
Contributor I

Hi, I am trying to toggle the state of my J10[8] pin but I can't write to it and it outputs the wrong logic after initialization.

My end goal is to use the LPSPI1 port to connect to my Renesas PTX105R NFC reader but now I am trying to debug the LPSPI port. I have initialized the J10[8] pin to have an initial output logic of 0 and to take the GPIO3 pin 29 as input signal so that I can write to it from software. (see picture)

But after executing BOARD_InitPins the J10[8] pin measures to 3.3V instead of 0V, and it does not change when I try to use GPIO_PinWrite(GPIO3, 29U, 0U). What am I missing?

Labels (1)
0 Kudos
Reply
1 Solution
629 Views
Habib_MS
NXP Employee
NXP Employee

Hello again @violkvas,
when you click the button called "Update code", appears the next window:

Habib_MS_0-1719529268522.png

This window describes what files will change when you update the code.

 when you click, can you see the next message in Pin_mux.c file?

Habib_MS_1-1719529268523.png

At the same time, this link has many trainings that could help you to learn more about how use config tools, also in the same link you can see the file called "MCUXpresso Config Tools User's Guide (IDE)" that could be helps.

Also, if you experience any issue, do not hesitate to let me know.

BR

Habib

View solution in original post

0 Kudos
Reply
4 Replies
668 Views
Habib_MS
NXP Employee
NXP Employee

Hello @violkvas,

I tested the pins with the configuration that you provided me in RT1170-EVKB. However, I did not see any issue respect the initial state (the value can toggle and initialize in logic 0).

In order to support you better, can you provide me the function generated by config tools called "BOARD_InitPins()"? This is in order to try a pinpoint if the issue is in the configuration of each pin.

Also, if you experience any issue, do not hesitate to let me know.

BR

Habib.

0 Kudos
Reply
649 Views
violkvas
Contributor I

Hi, I did eventually figure it out but good to know that you agree with the settings because I'm very new to all of this.

I found that the pins tool didn't generate the correct code when I pressed 'Update code' with my configuration. I commented out the old setting and set it to the GPIO pin I wanted manually and then everything worked.

IOMUXC_SetPinConfig(
      /*IOMUXC_GPIO_AD_30_LPSPI1_SOUT*/
      IOMUXC_GPIO_AD_30_GPIO_MUX3_IO29,
      0x02U);

 However I do wonder why it is that the pins tool does not alter to or generate up-to-date code?

0 Kudos
Reply
630 Views
Habib_MS
NXP Employee
NXP Employee

Hello again @violkvas,
when you click the button called "Update code", appears the next window:

Habib_MS_0-1719529268522.png

This window describes what files will change when you update the code.

 when you click, can you see the next message in Pin_mux.c file?

Habib_MS_1-1719529268523.png

At the same time, this link has many trainings that could help you to learn more about how use config tools, also in the same link you can see the file called "MCUXpresso Config Tools User's Guide (IDE)" that could be helps.

Also, if you experience any issue, do not hesitate to let me know.

BR

Habib

0 Kudos
Reply
613 Views
violkvas
Contributor I

I see, I thought it updated the files for me. Thanks!

0 Kudos
Reply