Attachments are accessible only for community members.
Apr 02, 2021
09:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 02, 2021
09:51 AM
Hi, I am using two threads to stream in data via ping-pong operation and using slwr to control the data flow. If the slwr is always low during the data transmission, it works fine and no data missing when the counter limit value is set to 4095. However, if I flip-flop the slwr, it can work well only when I set the counter limit value to 4096. It is impossible for me to use two different values in one application since two cases are possible ( slwr always be low in one setting while flip-flop slwr in the other setting). How to deal with the counter value?
The data bus is 32 bits and the DMA configuration is as following,
//try creating a many to one dma channel
CyU3PDmaMultiChannelConfig_t dmaMultiConfig;
CyU3PMemSet ((uint8_t *)&dmaMultiConfig, 0, sizeof (dmaMultiConfig));
dmaMultiConfig.size = 16384; //GPIF counters set to 4095 32 bit words
dmaMultiConfig.count = 4;
dmaMultiConfig.validSckCount = 2;
dmaMultiConfig.prodSckId [0] = (CyU3PDmaSocketId_t)CY_U3P_PIB_SOCKET_0;
dmaMultiConfig.prodSckId [1] = (CyU3PDmaSocketId_t)CY_U3P_PIB_SOCKET_1;
dmaMultiConfig.consSckId [0] = (CyU3PDmaSocketId_t)(CY_U3P_UIB_SOCKET_CONS_0);
dmaMultiConfig.prodAvailCount = 0;
dmaMultiConfig.prodHeader = 0;
dmaMultiConfig.prodFooter = 0;
dmaMultiConfig.consHeader = 0;
dmaMultiConfig.dmaMode = CY_U3P_DMA_MODE_BYTE;
dmaMultiConfig.cb = NULL;
dmaMultiConfig.notification = 0;
apiRetStatus = CyU3PDmaMultiChannelCreate (&glDmaChHandleMulti, CY_U3P_DMA_TYPE_AUTO_MANY_TO_ONE,&dmaMultiConfig);
The state machine configuration file is attached.
Labels
- Labels:
-
USB Superspeed Peripherals
7 Replies