Code which perform "Callback function invoked at end of transaction" by Consumer (Egress) Socket

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

cross mob
jkhoo
Level 3
Level 3
25 replies posted 25 sign-ins First solution authored

slfifosync example code is running in Manual mode.

Which part of the codes in cyfxslfifosync.c (slfifosync example) represent the "Callback function invoked at end of transaction" by Consumer (Egress) Socket ? illustrated in FX3_PROGRAMMERS_MANUAL page 77.

0 Likes
1 Solution
Biren_R
Moderator
Moderator
Moderator
First question asked First like given 250 sign-ins

Hello,

you need to update your dmaCfg.notification as per 1st replay and then use this if condition, in the same callback function.

Best Regards,
Biren

View solution in original post

0 Likes
3 Replies
Biren_R
Moderator
Moderator
Moderator
First question asked First like given 250 sign-ins

Hello,

To invoke the callback on the consumer socket we need to register this as an event as I show below.

dmaCfg.notification = CY_U3P_DMA_CB_PROD_EVENT | CY_U3P_DMA_CB_CONS_EVENT;

and then we can catch this event is a respective callback CyFxSlFifoUtoPDmaCallback or CyFxSlFifoPtoUDmaCallback.

Best Regards,
Biren

0 Likes
jkhoo
Level 3
Level 3
25 replies posted 25 sign-ins First solution authored

But it is clearly stated in the notes at line 147 and 174 that :

CyFxSlFifoUtoPDmaCallback() : DMA callback function to handle the produce events for U to P transfers.

CyFxSlFifoPtoUDmaCallback() :  DMA callback function to handle the produce events for P to U transfers.

Are you saying that i just need to add in another block of

"if (type == CY_U3P_DMA_CB_CONS_EVENT) {...}

to handle "Callback function invoked at end of transaction" by Consumer (Egress) Socket ?

0 Likes
Biren_R
Moderator
Moderator
Moderator
First question asked First like given 250 sign-ins

Hello,

you need to update your dmaCfg.notification as per 1st replay and then use this if condition, in the same callback function.

Best Regards,
Biren

0 Likes