How do I write to GPIO_AD pins on my RT1170?

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

How do I write to GPIO_AD pins on my RT1170?

跳至解决方案
179 次查看
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?

标签 (1)
0 项奖励
1 解答
61 次查看
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 项奖励
4 回复数
100 次查看
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 项奖励
81 次查看
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 项奖励
62 次查看
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 项奖励
45 次查看
violkvas
Contributor I

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

0 项奖励