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.

MSP430F5529 USB example code port to MSP430F5510.

Other Parts Discussed in Thread: MSP430F5510, MSP430F5529

Hi.

 

Im pretty new to the world of USB and having problems getting any of the test examples running on our custom hardware using a MSP430F5510.

I can see with a USB Bus monitor a lot of in transactions when the USB is attached, The board is self powered. 99.9% of these are NAKed and randomly sometimes one will be ACKed. Sometimes the CRC is correct sometimes not the NAKing is regardless of the CRC state.

I see that the "chirp" is timing out without response so assuming that we are just a FS device that is ok.

The MCU is pulling the D+ line High once connected and I only see a suspend interrupt (after the powerOn event). So im assuming that all other transferring of data is handled by the Peripheral directly accessing End point 0 In buffers. Endpoint address locations is something that i have not edited from the examples but have checked all the address and they appear correct . the only one im unsure about is the tInputEndPointDescriptorBlock , and tOutputEndPointDescriptorBlock but at the moment im assuming they are correct (but this could well be my mistake 0x23C8,0x2388 respectively)

 Im not sure how the tSetupPacket location is used or where, if at all it should be configured by the application. Im assuming it is populated by the host during enumeration.

I have built the isr.c and descriptor files with the tool provided in the example software and have also double checked this as much as I can and it looks good.

Im using X2 with a 6MHz crystal. At the moment i have not added any of my own code that would be interfering with the usb as i just want the device to connect to windows at the moment. Im currently using the H1 example which is a HID Datapipe.

 

Have been working on this for a week now with no luck. Any help would be really appresated.

 

Thanks Alex

  • An update.

     

    I have found that if i comment out the USB_suspend interrupt function the device will connect to Windows.

     

    I am able to get the TI test app to connect to you board and it will echo the string back to the applaction. How ever if i press enter quickly the Pipe seems to breakdown and will not recover. The message HID Send timeout

     

    Would love some help on this

     

    Alex

  • Hi Alex,

    I know it's a long time sonce you posted this question but do you have further details on this problem. I've a MSP430F5529 and tried to get it working with one of TIs examples but witout any success. What else have you done except the inserted comment?

    Kind regards

    Torben

  • Hi Alex,

    I tried to comment the line

    - USB_suspend();

    in UsbIsr.c (generated by MSP430_USB_Description_Tool) and that helps for the moment. But why is it working with the line as comment and not working with the line set active? I guess this is an timing issue - maybe the MSP is to fast for windows?!?!

    Kind regards

    Torben

  • Hi,

    I'm quiet sure that there is a timing issue. With the following changes I get good results. The MSP430 connects well to the Windows Computer.

    - set UsbIsr.c line "USB_suspend();" active again - like it is generated by TIs tool

    - go to ../USB_common/usb.c

    BYTE USB_enable()

    {

    ...

    //XT2_Start(XT2DRIVE_3); // TI version
    XT2_Start(XT2DRIVE_0); // MY version for 4MHz crystal

    ...

    //wait 1/2 ms till enable USB

    //for (i = 0; i < USB_MCLK_FREQ / 1000 * 1 / 2 / 10; i++){} // TI version

    //wait 1 ms till enable USB

    for (i = 0; i < USB_MCLK_FREQ / 1000 * 1 / 10; i++){} // MY version

    }

    I tested it with MSP430F5529 Rev. E

    Kind regards

    Torben

**Attention** This is a public forum