- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi, I want to transfer data from the gpif to PC. the fx3 was working dma auto mode, gpif width=16bits,I want reset the DMA buffer before every transfer to clear the DMA buffer data。How should I do,thx
Solved! Go to Solution.
- Labels:
-
USB Superspeed Peripherals
- Tags:
- reset dma buffer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You could reset the channel using CyU3PDmaChannelReset(..} API and flush the endpoints using CyU3PUsbFlushEp(..) API when the device config is changed. You could refer to ApplnStop(..) functions in the FX3 SDK. (replace channelDestroy with channelReset)
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Could you let us know why DMA buffer needs to be cleared before every transfer?
Memset function could be used to clear the DMA buffer data, after the buffer has been consumed by the USB Side.
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need make sure the first data timing from the gpif is accuracy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there some demo code about "Memset function " could clear the DMA buffer data?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
"I need make sure the first data timing from the gpif is accuracy." Could you let us know what you meant by this?
Could you elaborate more on why DMA buffer needs to be cleared before every transfer?
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need get a 16K byte data from a stream device that can be config by pc,after change the device ,the dma buffer(such as 4K) has filled by the data which was configed last time .When PC get the 16K data from the DMA buffer,4K of the 16K data is not from the device with current config.It is not acceptable,and the stream device can not be intteruput.So I need to clear the DMA buffer,befor get the data from the DMA buffer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You could reset the channel using CyU3PDmaChannelReset(..} API and flush the endpoints using CyU3PUsbFlushEp(..) API when the device config is changed. You could refer to ApplnStop(..) functions in the FX3 SDK. (replace channelDestroy with channelReset)
Best Regards,
AliAsgar