- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have two Bulk endpoint and I made a “loop back” by copy the EP IN to EP OUT in software:
BulkInEndPt.XferData(ref buffer, ref bytes);
BulkOutEndPt.XferData(ref buffer, ref bytes);
Everything works fine. I want to measure the time between send and receive data. I set a GPIO(37) in CY_U3P_DMA_CB_CONS_EVENT and then I tried to reset that GPIO in a thread related to CY_U3P_DMA_CB_PROD_EVENT . But I get different intervals while I send same packet. I want to know that which factors affect on this time that varies each time (The time that GPIO is high)? BTW I have two threads in my code.
Thanks
Solved! Go to Solution.
- Labels:
-
USB Superspeed Peripherals
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am looking for time in whole path or at least from UIB C to UART T.
>> I understand the you need the time interval between data received from USB producer to UART transmitter. Instead of GPIO you can try using CyU3PGetTime API to get the timer ticks when the producer event for MANUAL IN channel is received and call the API again once the data is sent over UART. The difference in the timer ticks will be the time taken (in ms)
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
From the description and the firmware, I understand that you want to calculate the time for the loopback on USB side. Is my understanding correct? or is the loopback on the UART side?
If loopback is on USB side, you can calculate the time on the Host application side. As done in the streamer application of FX3 SDK.
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for your reply.
The flow is:
UART R-> In buffer ->CPU-> DMA(Manual IN)-> UIB C …//.. UIB P->DMA(Manual OUT) -> CPU-> Out buffer -> UART T
I used from DateTime before BulkInEndPt.XferData and after BulkOutEndPt.XferData in host application, but I think It shows time between UIB C to UIB P. right? I am looking for time in whole path or at least from UIB C to UART T.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am looking for time in whole path or at least from UIB C to UART T.
>> I understand the you need the time interval between data received from USB producer to UART transmitter. Instead of GPIO you can try using CyU3PGetTime API to get the timer ticks when the producer event for MANUAL IN channel is received and call the API again once the data is sent over UART. The difference in the timer ticks will be the time taken (in ms)
Rashi