This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

F5529 composite device driver

Other Parts Discussed in Thread: MSP430F5510

Hello!

I am playing with the 5529 USB evaluation board right now.

I have compiled one of the composite devices, the one with HID, CDC and MSC, and loaded the

result on the board. When plugging to a USB poart, there are 2 items appearing in the removable

devices area, and I can add files and folders, so as far as mass storage is concerned, everything

seems to work well.

Now I want to use this code as a base program to develop a simple data logger, and I would

like to use serial port to communicate with the board.

I have noticed that one "Virtual Com port" appears in the device manager. As it appears with a

yellow (!) mark, I wanted to update the driver. I did it the by looking at several places containing

"MSP430_CDC.inf", but the installer fails.

Is it the right driver? Should I try to look for something else? Is there a tutorial somewhere to use

the composite device?

Thanks for any pointer.

Pascal

 

  • There should be a .inf file in the USB_config directory that you can use for the install. The inf file needs to match the descriptor data that is compiled into the device.

    example:

    USB_config/1CDC+1HID+1MSC_descTool.inf

    assuming this is the example you compiled.

    Wayne

  • Hello Wayne!

    Thanks for your reply. I used the wrong inf. I replaced with the one found in the eample/USB_config and it's fine.

    Now my PC seems to know what is installed, and I have a new COM port.

    Now how do I communicate with this com port?

    I was used to VCP that can be used like a plain serial port, therefore it goes fine by simply using a UART.

    Just in case, I opened hyperterminal, tried to connect to the new com port, but hyperterminal just replies it

    can't open the port. So is there a pointer somewhere explaining how to send a byte from a PC and how

    to receive it on the MCU side?

    Thanks!

    Pascal 

  •  Hello

    I used the MSP430F5529 and downloaded the “MSP430_USB_Developers_Package-3.0-Installer.exe”.

    I have compiled one of the composite device example(CHM1_Example), and loaded the result on the board, when plugging to a USB port, we can see a USB device appeared with a yellow symbol in the Device Manager. After less than a second, the unknown device disappeared and replaced by a USB Composite Device in the Universal Serial Bus controllers class and then appeared three items with yellow(!) mark,  a Virtual COM Port(CDC) in the Ports(COM&LPT) class and one HID Interface ,one MSC Interface in the Other Devices class. Then the Windows point out found new devise(Virtual COM Port(CDC) ) and guided you installing drive, and then I selected the .inf file which as you said "1CDC+1HID+1MSC_descTool.inf". After a while the CDC drive installed seems OK and the Virtual COM Port is COM4. After that, then the PC automatic installed the USB Mass Storage Device and the USB Human Interface Device. At this time all the yellow(!) mark have disappeared. Then I tested the Removable Disk it can read and write file normally. So I consider the program has running normally in my demo board. But I want to use the Virtual COM Port; it only can open the Virtual COM Port (COM4) correctly, but can’t be sending one byte or received one byte. This is my question.

    I already tested the CDC Examples such as "C3_Example", it can running normally in my demo board and can send byte or receive byte correctly. And we also tested the Composite Examples such as "CC1_Example", it also has similar problem, after plugged the USB port, the Device Manager updated and appeared three new items, a USB Composite Device and two Virtual COM Port (CDC) with two yellow(!) marks, then we can installed CDC drive, after that, all the yellow(!) marks have disappeared, everything seems normally, we also can open the Virtual COM Port CDC (COM5) and (COM6), but it still can’t send and receive byte.

    I must declare I used the right .inf file every example, just as you said in each project file. And we tried reset the PC, removed all the drives and installed the CDC drive again, we also try to replaced PC and demo board, but also didn’t find any different between it, we even doubt whether the example correctly?  Why it didn’t work normally in our environment (We used Windows XP OS)?  What environment did you test for these examples?  Or whether I have something didn’t care?  I hope you can give me some advice, thank you very much.

  • Hi,

    i used the MSP430F5510's USB port as a virtual com port with the CDC stack. When I stared my project there wasn't yet the 2.x USB stack so i started with a earlier version (i think 1.x something).

    I started working with the "char echo" example.

    It worked very well and I put it in my design without too much pain. After a while the 2.x stack came out. I tried it at once but I had the surprise that it didn't work very well.

    Therefore I decided to keep the old stack!

    So if you are able to find it, I would try the old stack with the "echo" example and the .inf file provided!

     

    Regards,

    Carloalberto

  • Hi Carey,

    > And we also tested the Composite Examples such as "CC1_Example", it also has similar problem.


    I found minor bugs on CC1_Example main.c, at the third parameter of cdcSendDataInBackground(), as follows.
    Fixing these bugs, both of two COM ports work as expected.

    MSP430_USB_Developers_Package_3_0_0_0/MSP430_USB_API_Stacks/examples/compositeExamples/CCS/CC1_Example/main.c
    MSP430_USB_Developers_Package_3_0_0_0/MSP430_USB_API_Stacks/examples/compositeExamples/IAR/CC1_Example/main.c

    VOID main(VOID)
    {
        ...
        while(1)
        {
            ...
            switch(USB_connectionState())
            {
               ...
               case ST_ENUM_ACTIVE:
                    ...
                    if(bDataReceived_event0) //CDC0
                    {
                        ...
                        if(retInString(wholeString))                     //Wait for enter key to be pressed
                        {
                            strcat(wholeString,"\r\r\n");
    //                      if(cdcSendDataInBackground((BYTE*)wholeString,strlen(wholeString),1,1))   // <---- bug
                            if(cdcSendDataInBackground((BYTE*)wholeString,strlen(wholeString),0,1))



                    if(bDataReceived_event1)  //CDC1
                    {
                        ...
                        if(retInString(wholeString))                     //Wait for enter key to be pressed
                        {
                            strcat(wholeString,"\r\r\n");
    //                      if(cdcSendDataInBackground((BYTE*)wholeString,strlen(wholeString),0,1))   // <---- bug
                            if(cdcSendDataInBackground((BYTE*)wholeString,strlen(wholeString),1,1))

    Tsuneo

  • Sorry, it was a feature, not bug. I missed this comment at the top of main.c

    main.c

    CDC to CDC Chat Demo:

     This USB demo example is to be used with two instances of a PC application
     (e.g. HyperTerminal) The demo application demonstrates a simple chat program
     between the two terminals; Characters that are transmitted from one terminal
     are sent to the other.

    Anyway, CC1_Example works on WinXP-SP3, and 7 (x86/x64) - SP1.

    Tsuneo

  • Hi, Tsuneo

    I understand you mean.   I can see the "CC1_Example" can run normally in your environment, you can send and received byte rightly.  But I test  it  the result didn't the same , it didn't send and receive one byte . I don't know what's wrong. I used the same software as same as yours.  I use the IAR 5.10, what development tool you using? where are you working?

    I'am doing a project using MSP430, maybe I have some resource can share with you, maybe we can make friend,could you give me your QQ or MSN?

**Attention** This is a public forum