- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I am making an USB Composite device (UVC + CDC),But first I singly test UsbUart.zip in the address of http://www.cypress.com/documentation/code-examples/ez-usb-fx3-usb-uart-bridge-example , But I want to intercept data from usb-uart in FX3 fireware,How can I do?Next is my guess and question:
In the UsbUart project above mention,the USB-to-UART is bridge to another Uart port such as Log Uart(refer to function CyFxUSBUARTAppStart in cyfxusbuart) and the corresponding code peices is as following:
......
/* Create a DMA_AUTO channel between usb producer socket and uart consumer socket */
dmaCfg.size = size;
dmaCfg.count = CY_FX_USBUART_DMA_BUF_COUNT;
dmaCfg.prodSckId = CY_FX_EP_PRODUCER1_SOCKET;
dmaCfg.consSckId = CY_FX_EP_CONSUMER1_SOCKET;
dmaCfg.dmaMode = CY_U3P_DMA_MODE_BYTE;
dmaCfg.notification = 0;
dmaCfg.cb = NULL;
dmaCfg.prodHeader = 0;
dmaCfg.prodFooter = 0;
dmaCfg.consHeader = 0;
dmaCfg.prodAvailCount = 0;
apiRetStatus = CyU3PDmaChannelCreate (&glChHandleUsbtoUart,
CY_U3P_DMA_TYPE_AUTO, &dmaCfg);
But I want to intercept data from usb-uart in FX3 fireware,How can I do?Modifing CyFxUSBUARTDmaCallback to get input->buffer_p.buffer and do process, Is that right? If not ,what can I do?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can interpret the data received over the VCOM ( over USB) in the DMA Callback.
For this, you need to use DMA Manual Channel.
If you do not want to commit the received data to UART peripheral, you can discard the buffer in the DMA Call Back itself.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can interpret the data received over the VCOM ( over USB) in the DMA Callback.
For this, you need to use DMA Manual Channel.
If you do not want to commit the received data to UART peripheral, you can discard the buffer in the DMA Call Back itself.