When to use CyU3PDmaChannelSetWrapUp

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

cross mob
WGT_4383351
Level 5
Level 5
First like received

In AN87216 slave firmware, there is

CyU3PGpifRegisterCallback(CyFxApplnGPIFEventCB);

CyU3PDmaChannelSetWrapUp(&glChHandleSlaveCh1);

What is the purpose, is this required as a work around for chip bug?

0 Likes
1 Solution
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hello,

If any state in the state machine has the action INTR_CPU associated with it, then the state machine will Interrupt the on-chip CPU to generate CYU3P_GPIF_EVT_SM_INTERRUPT event, which is to be handled by the firmware application. This handling is done by the GPIF callback function which is registered using the API CyU3PGpifRegisterCallback.

Normally, a PROD event is triggered only when a full Buffer is received on the Producer socket. But the API CyU3PDmaChannelSetWrapUp will invoke the DMA callback function with the PROD_EVENT triggered even if the received buffer is a partial buffer or this is used for committing partial buffers.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna

View solution in original post

0 Likes
1 Reply
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hello,

If any state in the state machine has the action INTR_CPU associated with it, then the state machine will Interrupt the on-chip CPU to generate CYU3P_GPIF_EVT_SM_INTERRUPT event, which is to be handled by the firmware application. This handling is done by the GPIF callback function which is registered using the API CyU3PGpifRegisterCallback.

Normally, a PROD event is triggered only when a full Buffer is received on the Producer socket. But the API CyU3PDmaChannelSetWrapUp will invoke the DMA callback function with the PROD_EVENT triggered even if the received buffer is a partial buffer or this is used for committing partial buffers.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes