Problems with USB VCOM on Cortex-M0+ and USB RL

Hello Forum! I am working on a FRDM-KL25Z dev board and hopign to have it come up as a virtual com port on a windows machine and then interact with the incoming data inside the ARM. I didn't see a straightforward example of doing a VCOM port on this processor so I started out with the USB HID example for the tower system with the same processor (Keil\ARM\Boards\Freescale\XTWR-KL25Z48M\RL\USB\Device\HID) and then copied the usb_config.c and usbd_user_cdc.c from another example (Keil\ARM\Boards\Keil\MCBSTR9\RL\USB\Device\CDC). The project compiles, I load it on the target, and then I see the virtual com port on my system (after installing the driver). I have stripped out the code from usbd_user_cdc.c to remove UART functionality. The problem I am having is when I try to open the virtual com port on the windows side. I tried 9600 baud, which seemed to be the default rate in the demo. I tried Putty and RealTerm, both applications hang when I try to open the specific com port. I was wondering if you folks had an idea what I was doing wrong or how I can begin to troubleshoot this. I have debugging access and it seems that USB works enough to identify its self on my system. I also included the CM1 usb library. I added some relevant code below. (I verified usb_config.c with the wizard and it seems to make sense) Thank you in advance!

I had to put the files on pastebin to meet the 7000 character limit

usb_config.c: http://pastebin.com/4vtczSUB
usbd_user_cdc.c: http://pastebin.com/RrSrH3ML
usbd_MKL25Z4.c: http://pastebin.com/D9WGuqnD

Parents
  • > I tried Putty and RealTerm, both applications hang when I try to open the specific com port.

    These PC applications put a sequence of these requests when they open target COM port.
    - Get_Line_Coding
    - Set_Line_Coding
    - Set_Control_Line_State

    Using a hardware bus analyzer, or a software sniffer, specify the request on which your firmware fails. It narrows down the existing range of bug on your source code.

    A sniffer, which recognizes CDC, is preferable. For example,

    USBlyzer - 33 days trial
    www.usblyzer.com/download.htm

    Run USBlyzer, enable "Capture->Capture Hot-plugged" menu, and plug in your device.
    And then open the COM port using PC application.
    What kind of error do you see on the log?

    Tsuneo

Reply
  • > I tried Putty and RealTerm, both applications hang when I try to open the specific com port.

    These PC applications put a sequence of these requests when they open target COM port.
    - Get_Line_Coding
    - Set_Line_Coding
    - Set_Control_Line_State

    Using a hardware bus analyzer, or a software sniffer, specify the request on which your firmware fails. It narrows down the existing range of bug on your source code.

    A sniffer, which recognizes CDC, is preferable. For example,

    USBlyzer - 33 days trial
    www.usblyzer.com/download.htm

    Run USBlyzer, enable "Capture->Capture Hot-plugged" menu, and plug in your device.
    And then open the COM port using PC application.
    What kind of error do you see on the log?

    Tsuneo

Children
More questions in this forum