FX3 GPIO after PWM

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

cross mob
lock attach
Attachments are accessible only for community members.
Corrado90
Level 1
Level 1
5 sign-ins First reply posted First question asked

Dear community,

I'm trying to use a GPIO pin that was previously used as a PWM.
The problem is that when I re-configure it, it stay in 3-state mode instead of High level. 

What I'm doing wrong?

In attached you can find the code, many thanks in advance.

Regards,
Corrado

 

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

Hello Corrado,

Before trying to override an already overriden GPIO, please make use of the API CyU3PDeviceGpioRestore().  Please refer to the FX3 API Guide to understand more about this API.  This document comes along with FX3 SDK and can be found in the following location:

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

Please try to use this API immediately before CyU3PDeviceGpioOverride() when it is used after the first usage. Please try this and let us know the result.

Best Regards,
Jayakrishna

View solution in original post

0 Likes
4 Replies
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hello Corrado,

Please check the return status of each API in the infinite while loop and share the UART debug logs for us to check. Also, please let us know if you are seeing the same issue when you try to drive the GPIO low?

Best Regards,
Jayakrishna
0 Likes
lock attach
Attachments are accessible only for community members.

Hello Jayakrishna,

Many thanks for your answer, I tried different combination of LOW, HIGH or both in sequence, but the problem seems always the same: I'm not able to use a GPIO previusly used  as PWM.

In attached you can find:
- the test project
- a debug log (all API returns OK)
- an oscilloscope plot showing the problem

Many thanks in advance, regards,
Corrado

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

Hello Corrado,

Before trying to override an already overriden GPIO, please make use of the API CyU3PDeviceGpioRestore().  Please refer to the FX3 API Guide to understand more about this API.  This document comes along with FX3 SDK and can be found in the following location:

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

Please try to use this API immediately before CyU3PDeviceGpioOverride() when it is used after the first usage. Please try this and let us know the result.

Best Regards,
Jayakrishna
0 Likes

Hello Jayakrishna,

many thanks, now it's working fine.

Kind regards, 
Corrado

0 Likes