You are here

FX3 simple GPIO pins initialization | Cypress Semiconductor

FX3 simple GPIO pins initialization

Summary: 2 Replies, Latest post by Andey on 08 Feb 2016 12:06 AM PST
Verified Answers: 0
Last post
Log in to post new comments.
Andey's picture
2 posts


We have a custom FX3 based controller. Our controller has is very similar FX3 chip connection to DVK board. The difference is additional output pins usage: they are GPIO[26], GPIO[27], GPIO[45]. We use synch slave FIFO sample as a base for out project. To use new GPIO pins we use CyU3PDeviceGpioOverride and CyU3PGpioSetSimpleConfig methods. These methods are placed after state machine start. The problem I have is a wrong GPIO[45] initial state after GPIO configuration. I want to have a '0' (low) output on GPIO[45] initially, but this output is set to '1' (high) after startup of firmware. At the same time two other pins (GPIO26 and GPIO27) are correct after initialization and all three pins are controlled correctly with CyU3PGpioSetValue and CyU3PGpioGetValue methods from UsbSetup callback.

The same problem I have with I2C devices located on our board. We need to preset one of I2C devices on initialization. But write to I2C is failed in AppThread_Entry method. And again all works properly from UsbSetup callback.

mady's picture
Cypress Employee
964 posts


The initialvalue after GPIO Confguration can be set in the CyU3PGpioSetSimpleConfig API in the outValue field. You can make it CyTrue or CyFalse to set the initial state as high or low after the GPIO Config Api.

We need to check why the i2c write has failed actually. Please create a Tech Support Case and share your firmware to us for review.


- Madhu Sudhan



Andey's picture
2 posts

Thank for response. I think I was not clear.

CyU3PGpioSetSimpleConfig API is called for GPIO pins 26,27,45. outValue is set CyFalse for GPIO[26], CyTrue for GPIO[27], CyFalse for GPIO[45]. After initialization FX3 pins physical state are: GPIO[26]=0, GPIO[27]=1, GPIO[45]=1. So the problem is that GPIO[45] is not reset as it is specified in CyU3PGpioSetSimpleConfig method call. In the same time GPIO[26], GPIO[27] initialization works properly.

Log in to post new comments.