cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

New Contributor II

I want to implement loopback that is based on slavefifosync project, but my customized fx3 hardware supports only two flags connection on pins (G7 & G6),

but loopback source code uses 4 flags (flaga, flagb, flagc & flagd). Can I make loopback source code work with only two flags (example: flaga(full flag), flagc(empty flag))?

If yes, what changes should I do in the source code and pin configuration? And what do you suggest about this approach.

0 Likes
Reply
1 Solution
Moderator
Moderator

Hello,

The slavefifosync application example uses 4 flags - 2 for write operations and 2 for read operations. Out of those 2 flags for each read and write, 1 flag is to know the readiness of the DMA buffer and the other flag is a watermark flag which is used to reduce the delays incurred.

So, since you have mentioned that your application can use only 2 flags, you can choose to use only the DMA ready flags for each thread used in your application omitting the watermark flags. The drawback of this is the loss of watermark flag.

Alternate option would be to use current thread DMA ready and current thread DMA watermark flags instead of using flags for dedicated thread. The disadvantage in this method is the delay caused during the switch from one thread to another thread.

Please refer to section 7. Flag Configuration of the AN65974 application note.

Best regards,
Srinath S

View solution in original post

0 Likes
Reply
1 Reply
Moderator
Moderator

Hello,

The slavefifosync application example uses 4 flags - 2 for write operations and 2 for read operations. Out of those 2 flags for each read and write, 1 flag is to know the readiness of the DMA buffer and the other flag is a watermark flag which is used to reduce the delays incurred.

So, since you have mentioned that your application can use only 2 flags, you can choose to use only the DMA ready flags for each thread used in your application omitting the watermark flags. The drawback of this is the loss of watermark flag.

Alternate option would be to use current thread DMA ready and current thread DMA watermark flags instead of using flags for dedicated thread. The disadvantage in this method is the delay caused during the switch from one thread to another thread.

Please refer to section 7. Flag Configuration of the AN65974 application note.

Best regards,
Srinath S

View solution in original post

0 Likes
Reply