FX3 GPIF/PIB to CPU DMA problem in USB high speed, but not in USB super speed

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

cross mob
ReBa_1054056
Level 2
Level 2
10 sign-ins 10 replies posted 5 replies posted

I have a FX3S design which functions like a camera and can operate in a recording mode (when USB is disconnected) and in mass storage mode (when USB is connected).

During the mass storage mode the recorded data can be read from the SD.

During the recording mode the CPU uses a AUTO DMA channel to pass the data from the PIB (GPIF) to the SD. Besides this the CPU can also use a MANUAL_IN and MANUAL_OUT DMA channel to pass 512 command bytes from PIB to the CPU memory and from the CPU memory to PIB. This all functions without any problem when USB is disconnected.

When the recording mode is used (for debugging) when the USB is connected, the data is not passed on to the SD but to an USB bulk IN endpoint. The 512 command bytes can also be transferred back and forth between CPU and PIB using the same DMA channels as in the USB disconnected state. This MANUAL_IN DMA transfer using CyU3PDmaChannelSetupRecvBuffer however only works when connected to a USB3.0 superspeed PC port, and not when connected to a USB2.0 highspeed PC port.

In the case of the highspeed connection the DMA status (using CyU3PDmaChannelGetStatus) remains in 0x4 (= CY_U3P_DMA_CONS_OVERRIDE). In case of a superspeed connection everything works fine and the 512 bytes are transferred.

What is changed within the FX3 or FX3S regarding to the DMA from PIB to CPU when using highspeed compared to superspeed?

0 Likes
1 Solution
YatheeshD_36
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello,

Please refer to this KBA which explains all about the DMA channel in override mode: DMA Channel in Override Mode in FX3/CX3 - KBA229098

The CY_U3P_DMA_CONS_OVERRIDE mode indicates that the transfer is not yet complete.

You can use the CyU3PDmaChannelWaitForRecvBuffer API to wait for the completion of the transfer and then proceed after a success return from the API.

Thanks,

Yatheesh

View solution in original post

0 Likes
5 Replies