You can use CyU3PBusyWait() API to implement a delay of the order of microseconds.
For more details about the usage of this function, you can refer to section 184.108.40.206 in FX3 API guide:
C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\doc\firmware
thanks for your hint, but it doesn't match my needs. I don't want to implement a delay, i have to measure the timestamp of several events, so i may compute the delay between every couple of them. If i well understood, the CyU3PBusyWait() function implements a known delay, is it right?
You can try the following to compute delay between two events in the order of microseconds:
1. Configure a complex GPIO to generate PWM output having time period 1us and 50% duty cycle.
2.Configure another complex GPIO as a counter. Short these two GPIOs. You can increment the count on negative edge of the pulse.
You can refer to 'cyfxgpiocomplexapp' example project provided in FX3 SDK:
C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\serialif_examples