how can I set a GPIO as an input pin with pull-up internally in FX3?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
HaHu_4486526
Level 1
Level 1

i try to set a GPIO as an input pin with pull-up internally in FX3. but it is failed. i don't know how to set GCTL_WPU_CFG register in firmware.

who can give me any comments? thanks a lot. ! !

0 Likes
1 Solution
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hello,

FX3 supports internal weak pull up/ pull down mode. You can set it by using the API CyU3PGpioSetIoMode(). This API make use of two arguments, one is the gpioid which indicates which GPIO pin to be updated and other is the ioMode which indicates whether it should be in pull down/ pull up mode. Please refer to the Page 312 of FX3 API guide for understanding more about this API. The FX3 API guide can be found in the following location:

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\doc\firmware

Note: This path depends on the installation directory of FX3 SDK.

Also, you can understand the implementation by going through the source code of the API. This can be found in the file cyu3lpp.c which can be found in the following location:

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\fx3_sdk_1_3_4_src\fx3_sdk_1_3_4_src\sdk\firmware\src\system

Again, the path mentioned above depends on the installation directory of FX3 SDK.

Please try using the API and let me know if you face any issues or have any queries.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna

View solution in original post

1 Reply
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hello,

FX3 supports internal weak pull up/ pull down mode. You can set it by using the API CyU3PGpioSetIoMode(). This API make use of two arguments, one is the gpioid which indicates which GPIO pin to be updated and other is the ioMode which indicates whether it should be in pull down/ pull up mode. Please refer to the Page 312 of FX3 API guide for understanding more about this API. The FX3 API guide can be found in the following location:

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\doc\firmware

Note: This path depends on the installation directory of FX3 SDK.

Also, you can understand the implementation by going through the source code of the API. This can be found in the file cyu3lpp.c which can be found in the following location:

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\fx3_sdk_1_3_4_src\fx3_sdk_1_3_4_src\sdk\firmware\src\system

Again, the path mentioned above depends on the installation directory of FX3 SDK.

Please try using the API and let me know if you face any issues or have any queries.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna