FX3 simple GPIO pins initialization | Cypress Semiconductor
FX3 simple GPIO pins initialization
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, GPIO, GPIO. 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 initial state after GPIO configuration. I want to have a '0' (low) output on GPIO 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.