FX3 timetick less than millisecond

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi,
on a FX3 project i need to measure delay times with a precision higher than milliseconds.
I noted CyU3PGetTime() function, but it returns milliseconds timeticks.
Is there any way to get thinner timeticks? I mean at least hundreds of microseconds or less?
Thanks.
 

0 Likes
5 Replies
Anonymous
Not applicable

Hi,

   

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 5.40.3.1 in FX3 API guide:

   

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\doc\firmware

0 Likes
Anonymous
Not applicable

Thanks.

   

Regards.

   

Massimo

0 Likes
Anonymous
Not applicable

Dear rghe,

   

 

   

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?

   

 

   

Regards

   

Massimo

0 Likes
Anonymous
Not applicable

Hi Massimo,

   

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

0 Likes
Anonymous
Not applicable

Hi Rghe,

   

thanks for your hint, but last sunday i found this

   

http://www.cypress.com/knowledge-base-article/how-get-01-s-unit-timestamp-fx3-kba220034

   

and it works well for my purpose.

   

Regards.

   

Massimo

0 Likes