Handling Commit Buffer Failures during Video Transfers using FX3 (KA-03335)
In order to address this, the https://www.cypress.com/documentation/application-notes/an75779-how-implement-image-sensor-interface... AN75779 project is considered as a reference, and the DMA channel referred to is manual many-to-one.
The value of the dmaMultiConfig.count parameter of the multi-dma channel used in AN75779 for video transfer is 4. So, a total of eight DMA buffers are allocated to the channel. Two producer sockets for this channel are CY_U3P_PIB_SOCKET_0 and CY_U3P_PIB_SOCKET_1. Consumer socket is CY_U3P_UIB_SOCKET_CONS_3. Each producer socket has four buffers to be filled with data.
Consider the following:
-Name the allocated buffers as: buffer0, buffer1, buffer2, buffer3, buffer4, buffer5, buffer6, and buffer7.
-Buffer0, buffer1, buffer2, and buffer3 are the buffers available for PIB_SOCKET_0 to be filled with data.
-Buffer4, buffer5, buffer6, and buffer7 are the buffers available for PIB_SOCKET_1 to be filled with data.
In the dma callback handler associated with the video channel, once a PROD event is generated:
-The available buffer from the PIB socket (that is, occupied buffer) is obtained using the CyU3PDmaMultiChannelGetBuffer()
-The obtained buffer is committed using the CyU3PDmaMultiChannelCommitBuffer()
These steps are repeated in a while loop until no more buffers are available from the PIB socket.
More https://community.infineon.com/t5/Knowledge-Base-Articles/Handling-Commit-Buffer-Failures-Occurred-d... here.