cancel
Showing results for 
Search instead for 
Did you mean: 

Knowledge Base Articles

Usage of CyU3PDeviceGpioRestore in FX3 SDK - KBA233119

ArunKumarChoul
Employee

Usage of CyU3PDeviceGpioRestore in FX3 SDK - KBA233119

Version: **

Question: What is the workaround if we try to override a GPIO that is already overridden?

Answer: In an FX3 device, if we try to override an already overridden GPIO, then it may show erroneous behavior (the GPIO may stay tri-stated).

To avoid this erroneous behavior, the already overridden GPIO should be restored to its normal mode before it is overridden again. For this, the CyU3PDeviceGpioRestore () API can be used. More information on this API can be found in the FX3 API Guide. FX3 API guide comes along with FX3 SDK and can be found in the following path:

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

The correct sequence of steps to be followed are:

  1. Invoke the CyU3PDeviceGpioRestore () API for restoring the required GPIO to normal mode.
  2. Invoke the CyU3PDeviceGpioOverride () API to override the GPIO again.

The above approach can be used if we need to change an already overridden simple GPIO to a complex GPIO or vice versa.

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎Jun 16, 2021 11:09 PM
Updated by:
 
Contributors