I want the GPIF state machine to control some GPIO outputs.
Using GPIF-II designer I have configured an output pin, GPIO[25] as initially LOW (active HIGH), and within the GPIF state diagrams I have added a DR_GPIO to each state that asserts the output pin.
Once the GPIF is initialised I expected GPIO[25] to go HIGH, but it doesn't.
Any pointers as to where I may be going wrong?
A bit more information on where I'm having the issue....
I am using 'Cypress EZ-USB FX3 Video Class Example - AN75779' and I wanted a GPIO output to indicate which state of the state machine I am in. I have modified 'ImageSensorInterface.cyfx'. Using GPIF-II Designer 'Interface' tab, I have added a definition for an Output signal as:
From within the StateMachine tab I have added DR_GPIO action to the IDLE state as:
The GPIF-II prkect builds OK and I have copied the 'cyfxgpif2config.h' file into the USBVideoClass project and re-built the project.
I have added a few 'CyU3PDebugPrint' lines to the project and hence I know that GPIF is being initialised OK and started. I have connected VLC to the FX3 device, and I can see that I am getting video stream events, BUT GPIO[25] (CTL[8]) never gets set HIGH. I expected GPIO[25] to be set HIGH on entering from START -> IDLE state.
OK, I have now managed to get access to a scope and I now understand what I am seeing...after reading the documentation.
I expected that once the state that ASSERTED the GPIO pin had been entered, that the GPIO[25] would be asserted HIGH, and remain HIGH. I now understand that this assumption was incorrect. According to the documentation, the GPIO pin will only be ASSERTED for as long as it remains in that state. As soon as you leave the state, the GPIO pin gets DE-ASSERTED. Take a look at the TIMING SIMULATION within GPIF-II Designer, and you will see what I mean.
Now, for the even more confusing bit. If you want the GPIO pin to remain being driven you have 2 options:
What a confusing use of terminology: TOGGLE = steady-state!!!!