- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
16 bit data bus is used, I set the watermark value to 3, number of 16-bit data words that may be written after the clock edge at which the partial flag is
sampled asserted = 3 x (32/16) – 4 = 2
CyU3PGpifSocketConfigure(0, CY_U3P_PIB_SOCKET_0, 3, CyFalse, 1);
I also set only 1 DMA buffer with 8 bytes depth.
#define CY_FX_DMA_BUF_COUNT (1) /* slave Bulk channel buffer count */
#define CY_FX_DMA_TX_SIZE (8) /* DMA transfer size is set to infinite */
Then I use Control center to write 12 bytes data from master FX3 to slave FX3, it's correct that only 8 bytes can be received by slave. I expect Thread_0_DMA_Watermark (GPIO21) should be deasserted after 6 bytes data is transmitted by master but this pin's value isn't changed. Please kindly advise.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
By changing CY_FX_DMA_TX_SIZE, you are not changing the buffer size of the Slave device. Instead what happens when you set CY_FX_DMA_TX_SIZE to 8 is that DMA channel goes to idle state after 8 bytes are transmitted.
If you want to change the buffer size, you need to change the dmaCfg.size parameter.
And please note that the buffer size of the DMA channel should be a multiple of 16 bytes.
Regards,
Hemanth