U3V DMA on Leader packet

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

cross mob
user_1484456
Level 2
Level 2
25 sign-ins 10 replies posted 10 sign-ins

DMA channel runs in robin-round fashion for picture capture, and diffcult to transmit leader and trailer packet, so that a DMA channel is created to transmit leader,  then it is deleted, and an new DMA mulit-channel is created to transmit pixel data payload in robin-round fashion. after the picture is completed, this channel is deleted, and an new channel is created to tranmit final payload and trailer. though it is very slow to switch between diffrent DMA channel, it is a only choice for U3V solution on FX3.

I create a DMA channel to transmit leader as below, it works throughly, but no USB packet is found in BusHound. I don't know why it doesn't tranmit USB packet while no error log is found?

0 Likes
1 Solution
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

- Please confirm if the DMA channel (MANUAL OUT) and the endpoint configuration (0x83) is done after getting the USB event CY_U3P_USB_EVENT_SETCONF. If not, please try creating the channel after this event is seen.

- Also, confirm if the host application sends the USB IN request on the endpoint (0x83) for reading the Leader and trailer data.

You can check for the CY_U3P_DMA_CB_CONS_EVENT in the DMA callback. The CY_U3P_DMA_CB_CONS_EVENT will be triggered only when the USB consumes the data (i.e. when the host sends the IN request to that endpoint)

1) Register for the event and the callback

dmaCfg.notification =CY_U3P_DMA_CB_CONS_EVENT ;

dmaCfg.cb = CyUvcAppDmaCallback;

2) Trace the CY_U3P_DMA_CB_CONS_EVENT events in the callback

CyCx3UvcAppDmaCallback (

CyU3PDmaMultiChannel   *chHandle,

CyU3PDmaCbType_t  type,

CyU3PDmaCBInput_t *input )

{

  if(type == CY_U3P_DMA_CB_CONS_EVENT)

    {

        tx_count++;

}}

3) And later get the variable printed in the for(;;) loop

Please note that if different Channels are used for streaming and sending the leader and trailer packets the host application should send requests to both the endpoints 1)streaming endpoint 2) leader/trailer endpoint accordingly. The host application should be capable to synchronize the requests for leader >> video data >>trailer

You can try sending the leader and trailer with the same DMA channel instead of using two DMA channels.

This can be done by modifying the GPIF state machine such that the empty DMA buffers are committed to add a leader and trailer for each frame. This will happen in the DMA round-robin fashion.

Please refer to the GPIF state machine in this thread USB3 Vision DMA on Leader packet on FX3  and let me know if it helps

Regards,

Rashi

Regards,
Rashi

View solution in original post

0 Likes
1 Reply
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

- Please confirm if the DMA channel (MANUAL OUT) and the endpoint configuration (0x83) is done after getting the USB event CY_U3P_USB_EVENT_SETCONF. If not, please try creating the channel after this event is seen.

- Also, confirm if the host application sends the USB IN request on the endpoint (0x83) for reading the Leader and trailer data.

You can check for the CY_U3P_DMA_CB_CONS_EVENT in the DMA callback. The CY_U3P_DMA_CB_CONS_EVENT will be triggered only when the USB consumes the data (i.e. when the host sends the IN request to that endpoint)

1) Register for the event and the callback

dmaCfg.notification =CY_U3P_DMA_CB_CONS_EVENT ;

dmaCfg.cb = CyUvcAppDmaCallback;

2) Trace the CY_U3P_DMA_CB_CONS_EVENT events in the callback

CyCx3UvcAppDmaCallback (

CyU3PDmaMultiChannel   *chHandle,

CyU3PDmaCbType_t  type,

CyU3PDmaCBInput_t *input )

{

  if(type == CY_U3P_DMA_CB_CONS_EVENT)

    {

        tx_count++;

}}

3) And later get the variable printed in the for(;;) loop

Please note that if different Channels are used for streaming and sending the leader and trailer packets the host application should send requests to both the endpoints 1)streaming endpoint 2) leader/trailer endpoint accordingly. The host application should be capable to synchronize the requests for leader >> video data >>trailer

You can try sending the leader and trailer with the same DMA channel instead of using two DMA channels.

This can be done by modifying the GPIF state machine such that the empty DMA buffers are committed to add a leader and trailer for each frame. This will happen in the DMA round-robin fashion.

Please refer to the GPIF state machine in this thread USB3 Vision DMA on Leader packet on FX3  and let me know if it helps

Regards,

Rashi

Regards,
Rashi
0 Likes