Debugging through USB for CX3

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

cross mob
lock attach
Attachments are accessible only for community members.
Ajitesh_J_S
Level 2
Level 2
10 replies posted 5 questions asked 10 sign-ins

Hello,

This is in continuation to the thread: https://community.infineon.com/t5/USB-superspeed-peripherals/debugging-through-USB-for-CX3/td-p/3381...

I have followed the steps suggested in the various threads and KBAs regarding this. However, my project only has usb2.0 support and I have made modifications to add cdc interface under usb high speed.

I am able to see the device enumerates as cdc_acm and a new serial port is created. However when i open the serial port using puTTy with 115200 baud rate, i dont get any output. In the meanwhile, I only get a green/black screen in my video streaming application. I have made modifications to cycx3_uvc.c,cycx3_uvc.h and cycx3_uvcdscr.c according to the referred KBAs. Please find attached the above mentioned files from my project.

Please suggest what other changes I must make to my project to get the debug print messages via usb.

Below is the screenshot of the media player while streaming as well as putty terminal open

usbdebug.png

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

Please let me know if you open the putty terminal before programming the CX3. Opening the terminal port before programming will allow reading all the debug messages from CX3 otherwise there will be overflow conditions for CyU3PDebugPrint if data is not read by the CDC interface.

Also, please confirm if the video streaming worked fine with only the UVC interface. 

You can refer to the attached reference project with the CDC interface. Please note that cyU3PDebugPrint should not be called before calling CyU3PDebugInit 

Regards,
Rashi

View solution in original post

0 Likes
9 Replies
lock attach
Attachments are accessible only for community members.
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

Please let me know if you open the putty terminal before programming the CX3. Opening the terminal port before programming will allow reading all the debug messages from CX3 otherwise there will be overflow conditions for CyU3PDebugPrint if data is not read by the CDC interface.

Also, please confirm if the video streaming worked fine with only the UVC interface. 

You can refer to the attached reference project with the CDC interface. Please note that cyU3PDebugPrint should not be called before calling CyU3PDebugInit 

Regards,
Rashi
0 Likes

The putty terminal ttyACM0 was identified as the terminal that the cdc device shows as. The terminal only shows up after the cx3 device is programmed. So i can only open the terminal after it is programmed. Also please note only the USB2.0 interface is working, so both the uvc video streaming and cdc communication must be done in USB 2.0 

Video stream was exactly the same as it is in the previous attached screenshot, even with only the UVC interface.

 

I have not manually called CyU3PDebug print anywhere other than the default generated code from the cx3 configuration utility, hence it must be following the necessary guidelines.

In my previously attached zip file, I had made modifications according to the KBAs, as well as the reference project. Could you please confirm if that is correct or any additional changes are to be made on them. 

Thank you very much for your continued support

0 Likes
Ajitesh_J_S
Level 2
Level 2
10 replies posted 5 questions asked 10 sign-ins

During the renumeration process, the following message is seen which indicates an error with the cdc interfacecdc_error_msg.png

 

0 Likes

Hello,

Please let me know if the same problem is seen with the firmware shared in the previous post.

Regards,
Rashi
0 Likes

Hello,

Yes the same issue seems to be there with the firmware shared in the previous reply (Cx3UvcOV5640.zip)

Please find below a screenshot which shows the error after flashing above mentioned firmware in the CX3 chip. Note that I had to disable USB3.0 by setting status = CyU3PConnectState(CyTrue, CyFalse); in cycx3_uvc.c .

When i dont disable USB3.0, the device fails to enumerate at all.

errormsg_usb_debug.png

 

 

0 Likes

Hello,

Please refer to this thread  Solved: Re: The CDC of FX3 with composite device (UVC + us... - Infineon Developer Community   with a similar issue.

Please try programming usbuart example firmware, in the SDK (path: ...\Cypress\EZ-USB FX3 SDK\1.3\firmware\serialif_examples\cyfxusbuart), to FX3 and check if the driver is binding to the CDC interface. In usbuart example, the FX3 enumerates as a CDC device. This will help in isolating the problem.

Regards,
Rashi
0 Likes
lock attach
Attachments are accessible only for community members.

Hello,

Solved: Re: The CDC of FX3 with composite device (UVC + us... - Infineon Developer Community

The above thread was not applicable to my case, since I do not currently possess any of the reference Kit boards mentioned in the thread.

 

As for trying the SDK example cyfxusbuart, the following is the result:

The device is renumerating as expected with cdc_acm interface driver, and there is a new serial port called ACM0 present.

fx3usbdebugrenumeration.png

When Opening ACM0 using putty with 115200 baud rate, it does not display any message however. I have attached screenshots of the putty terminal as well

acm0opening.png

0 Likes

Hello,

When Cx3 is programmed with a USB-UART example, you will only see the messages when some data is sent by the UART interface to USB's CDC interface.

From this test, we can understand that the CDC interface can enumerate well on your ubuntu PC. It seems that the issue is with the firmware descriptors. 

Is your device (with UVC+ CDC) interface enumerating on Windows Pc?

Regards,
Rashi
0 Likes

The cx3 chip is part of a custom pcb which is part of a single board computer. I wont be able to connect the cx3 chip to a windows pc. Are there any other alternatives? also I had attached my descriptor and uvc.c files along with the original question. would it be possible for you to verify if my descriptors are correct in that? 

Thank you

0 Likes