CX3 UVC and Virtual COM

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi all,

   

I have the CX3 with a MIPI camera module and I can capture images using UVC driver. I'm using the OV5640 example.

   

I need to send data from a PC to the CX3, I don't know if is it possible in that project, I only can send and receive image parameters, but not and array, is there any way?

   

Can I configure also the CX3 also like a Virtual COM? (keeping UVC functions)

   

Regards,

   

Iban.

0 Likes
14 Replies
Anonymous
Not applicable

Yes, you can add one more interface which can bind to the COM drivers. For creating the interface, you need to define it in the descriptors, and create appropriate DMA channels. The USBUART example in the FX3 SDK describes the implementation oof USB-to-CDC/COM. You can use the OV5640 example and add the COM interface. Please try and let us know if you face any problem. 

0 Likes
Anonymous
Not applicable

Thanks Nishant

   

Firstly I try to test the USBUART example, I can buil and download to Denebola Board. When I download the firmware. the Device Manager detects me, the new COM port.

   

I try to send data to this port, but always gives me an error, I try with hyperteminal and with own serial communication application. How can I test if it es running, or how can I send data packet?

   

Thanks

0 Likes
Anonymous
Not applicable

Hi,

   

What error are you exactly getting? To test this example you can short the UART TX and RX pins on your board and when you send bytes from your serial terminal, you should be able to get back the same as a loop back.,

   

Regards,

   

- Madhu Sudhan

0 Likes
Anonymous
Not applicable

I've short TX and RX and also I connect another PC to RS232.

   

I'm using our own program make in Labview, I can open the port, but when I try to send gives me I/O error.

   

If I use any serial terminal software, I can open the port also, but when I send somthing I've not response. Do you recommend any software?

   

Wich are the settings of USBUART? 9600bps, 57600?

   

thanks

0 Likes
Anonymous
Not applicable

First you need to use the USBUART example from the FX3 SDK. Program the CX3 with this .img. Look for UART TX, and RX pins on CX3 and short them. You can use Tera term (as serial terminal software). Now, try to send any character, if you see the same on the terminal, it means that the loopback is fine

0 Likes
Anonymous
Not applicable

Thanks Nishant,

   

I try it without success, I don't know what I'm doing wrong.

   

I import as a new project the USBUART example (FX 1.3.3). I build it correctly. I download with Control Center to Denebola board.

   

When I do it, a new COM port appears on the PC. I open Tera Term, connect to that COM port and try to send a character, without success.

0 Likes
Anonymous
Not applicable

Did you try by shorting the TX and RX pins? Please connect oscilloscope to check if you are getting any signal on the TX when you type something in the tera-term

0 Likes
Anonymous
Not applicable

I try shorting... but I don't check with oscilloscope, I will feedback you

0 Likes
Anonymous
Not applicable

I check with oscilloscope and I don't have any signal.

   

Don't worry I will find another example like USB2SPI. For our application we need to send commands from Virtual Com, process it on CX3 and return the result to Virtual Com

   

Thanks

0 Likes
Anonymous
Not applicable

Were you able to make it work? The USBUART example is well tested and we have not seen any problem. As you have mentioned that you do not recieve data from the PC to the CX3 Uart lines. Please make the DMA in manual mode to see if you are geting any PROD even when the PC sends data. If you do not get, that may mean that the host is not able to send the data. We can see what is happening on the USB lines using a protocol analyzer. Also, please check using a different serial terminal as well. Are you able to open the COM, if so, I see that you mentioned an error while sending data, what is that error? 

0 Likes
Anonymous
Not applicable

I'm not able to make it work.

   

I will try your suggestions. Is there any example of the firmware of USBUART example, but not using DMA, or how I need to change it. For my application I need to receive data from USB, process those data in the microcontroller, and resend data through UART.

   

Thanks,

   

Iban.

0 Likes
Anonymous
Not applicable

You can create a manual channel where you can copy the data which you receive and it send it on the UART TX lines. We have only DMA example with USBUART

0 Likes
Anonymous
Not applicable

Finally I've create a protocol over UVC.

0 Likes

What you do in UVC? You send array with UVC?

I have same problem... Need send data to CX3.

0 Likes