cdc uart for debug but not print in PC uarttool

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.
rolic_4206696
Level 1
Level 1
5 replies posted First question asked First reply posted

Hi:

     I want to use cdc virtual uart as a debug uart, but PC uart tool can not print  anything.

can you help me?

Feige图片20190509143447.bmp

0 Likes
1 Solution

Hello,

1. Please check if there is a composite device corresponding to the VID/PID used in the firmware (In the example, the hardware IDs used are 0x4242/0xEC04)

2. For the interface with the name 'Bulkloop', choose“cypress fx3 usb bulkloopexample device"  ?

>> Yes. It can be choosen.

3. After choosing USB-Serial Port, there should not be any additional 'Unknown Device'. Please choose "Show Hidden Devices" under "View" tab of device manager and check if there is a device named "USB Bus Enumerator" under "USB Controllers" section.

Best regards,

Srinath S

View solution in original post

0 Likes
9 Replies
rolic_4206696
Level 1
Level 1
5 replies posted First question asked First reply posted

    /* 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);
    if (apiRetStatus != CY_U3P_SUCCESS)
    {      
        CyFxAppErrorHandler(apiRetStatus);
    }

dmaCfg.prodSckId = CY_FX_EP_PRODUCER1_SOCKET;

in this place, CY_FX_EP_PRODUCER1_SOCKET can replace CY_U3P_CPU_SOCKET_PROD?

I only want to print, so this producter shoud be CPU.

0 Likes

Hello,

Most of the FX3 SDK examples use the debug printing capability over the UART interface. For instance, please refer to USBBulkSourceSink example in the FX3 SDK. The CyU3PDebugInit() API automatically creates a DMA channel for debug printing with CPU as the producer socket.

Best regards,

Srinath S

0 Likes

hi:

     If i want to use cdc for debug print, i should how to do it?

thanks very much!

0 Likes

hi:

     In this project, I want to output some character information through the CDC serial port.

How do I change it?

such as SendDebugMessage("0123456789", 10);

Looking forward to your reply!

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

Hello,

Please refer to the attached projects which implement debug print over the CDC interface on the host. Kindly, let me know if this suits your requirement.

Best regards,

Srinath S

0 Likes

hi:

Thank you for your reply.

Using the example project you provided, I displayed two devices on the computer as follows:

Feige图片20190514103050.png

I have installed CYPress CDC driver,and i use all this driver,but it have not for this device. Is this a reminder that no driver is installed?

Feige图片20190514105936.png

Now how do I load the driver?

I'm looking forward to your reply.

0 Likes

Hello,

- The VID/PID that is used in this example is not present as part of the CypressSerial.INF file (Cypress CDC driver). Hence, the device will not be automatically bound to the Cypress driver.

- For the interface with the name 'CDC_Management', choose the 'USB-Serial Adapter' string from the Cypress Serial driver list. Upon successful installation of this, a new 'Unknown Device' comes up in the device manager. Follow the same procedure to manually load driver and choose 'USB-Serial Port' string from the list.

The CDC device should now be visible under the 'Ports' section in the device manager.

- For the interface with the name 'Bulkloop', use the Cypress CYUSB3 driver and follow the same procedure to bind manually.

Best regards,

Srinath S

0 Likes

hi:

Thank you for your reply.

Follow the steps you said. Now there's a problem.

1、For the interface with the name 'CDC_Management', choose the 'USB-Serial Adapter' string from the Cypress Serial driver list.

then PC show follow picture:

1.png

2、For the interface with the name 'Virtual Serial Port Device 00',choose 'USB-Serial Port' string from the list. At this point, a serial port appears, but an unknown device appears.  follow picture:

2.png

3、For the interface with the name 'Bulkloop' ,choose“cypress fx3 usb bulkloopexample device"  ?

飞鸽截图20190514170202.png

Best regards,

0 Likes

Hello,

1. Please check if there is a composite device corresponding to the VID/PID used in the firmware (In the example, the hardware IDs used are 0x4242/0xEC04)

2. For the interface with the name 'Bulkloop', choose“cypress fx3 usb bulkloopexample device"  ?

>> Yes. It can be choosen.

3. After choosing USB-Serial Port, there should not be any additional 'Unknown Device'. Please choose "Show Hidden Devices" under "View" tab of device manager and check if there is a device named "USB Bus Enumerator" under "USB Controllers" section.

Best regards,

Srinath S

0 Likes