If you look into the source CyU3PGpioSimpleSetValue API, there are few statements before which the GPIO state is actually written. Those statements are causing the delay.
If you replace this API by the single statement involving the register write, you will achieve the expected frequency.
For making the register write, please refer the source code of the CyU3PGpioSimpleSetValue API. The source code is available aloing with the FX3 SDK in "C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\fx3_sdk_1_3_3_src.zip"
- Madhu Sudhan
No, this response is completely incorrect. The GPIO is not causing the delay (I would be completely horrified if your GPIO API was implemented so poorly as to cause a timeable delay this gross on such a fast CPU!). The "few statements" you refer to will execute in mere nanoseconds which is an irrelevant amount - I'm talking about a fixed error on the documented clock rate!
If I toggle at 10Hz, I actually toggle at 10.24Hz. If I toggle at 1Hz, I actually toggle at 1.024Hz. The delay is constant irrespective of whether or not I use GPIO calls. The FX3 really is 'ticking' 1024 times each second, not 1000.
It's a little disappointing to receive such a poor (wrong) answer from a Cypress employee.