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.

DM814x_EVM USB issue

Hi,

I am trying to extend u-boot to use the USB port on this processor. I have previously done this on the DM816x_EVM and it works just fine.

 

The problem I am having is that it appears that the device address is not being set right interanally. I have a protocol analyzer hooked up and I see the get descriptor followed by a set address. But the next thing is another get descriptor to address zero. It should be sent to address one at this point.

 

I am writing to the FADDR register in the MUSB register set when the set address command is sent out. Is there anything else I need to do to make this work? I don't think it's a chip problem as the USB works when linux is running. The problem is isolated to u-boot.

 

Thanks in advance for you help,

Mack

  • Hi,

    I think you are initializing FADDR prior to the completion of the SET ADDRESS command. Handshake stage of the Command Transfer still takes place with ZERO address.

    Once you get the SETUP packet for the SET ADDRESS command, respond to that by indicating that you have unloaded the data from the FIFO and you are expecting no Data. You should NOT initialize FADDR at this time. You wait until you get the next interrupt.

    The next interrupt would be generated when the Handshake stage of the Control Command finishes. This stage is transparent to the user since the h/w takes care of the proper response.

    I think you DM816x_EVM is handling this part of the command stage properly if it worked for you. Otherwise, it should not work for the DM816x EVM or any other device.

    Best regards, Zegeye

  • Zegeye,

     

    Thanks for the suggestion. I really think I am doing that. I am using the following code bases:

     

    ti-ezsdk_dm814x-evm_5_03_00_09

    ti-ezsdk_dm816x-evm_5_01_01_80

     

    And I have done compares on the /drivers/usb/musb source code and they are the same after my modifications. That is why I am confused as to why it's not working.

     

    Mack

  • Hi,

    It seems that you are using the Driver code. I will move your post to the Linux Forum.

    I assure you it works. There is something that is going wrong (it is not the device).

    Do you happen to have a bus capture snapshot you can send us?

    I will wait for your reply and then will move this post to the Linux forum. These guys are aware of the code you are referencing and can help you better.

    Best regards, Zegeye

  • Zegeye,

     

    Here is the bus capture that I have. If you need more detail I can give that to you. As you can see the second get descriptor is still addressing device zero.

     

    Thanks,

    Mack

     

  • Hi Marc,

    I am not sure if you are aware but we have evaluation module (EVM) where customers and ourselves use to develop and run application. I used one of the EVMs and programmed USB0 as a Host and USB1 as a Device and performed enumeration transaction.

    I performed a GET DESCRIPTOR Command followed by SET ADDRESS command with Address ZERO. Then after performed GET DESCRIPTOR Command with Address 3. As you can see it worked well.

    Just to be on the same page: Are you using the device in Host mode or Device Mode. You mentioned that the address is Zero. I was under the impression that you were using the device as a Device. If you are using the device as a Host, you will need to program TXFUNCADDR[EP] and RXFUNCADDR[EP] registers for all endpoints. Endpoint 0 uses only TXFUNCADDR[0] and write to RXFUNCADDR[0] is not used. However, if using the device as a Peripheral then you will need to program only FADDR register.

    If you still are having a problem, please send me another capture where the SET ADDRESS command and the GET DESCRIPTOR command with the new address is expanded.

    Best regards, Zegeye

     

     

  • Zegeye,

     

    I read over your post about which registers needed to be written and after looking at the code discovered that the EP registers weren't being used. There is compile time parameter MUSB_NO_MULTIPOINT that was skipping over that portion of the code. That parameter was used in the example that I copied. After removing it from my configuration things worked as expected.

     

    Thank you very much for your help,

    Mack

  • Hi

    I am system engineer with using DM8168x_EVM board. I read your post that you have succeeded to port USB driver to U-boot.

    Could you share your u-boot source code that have USB driver merged?

    Our project really need u-boot with usb-storage enabled version.

     

  • Hi Mack,

    You said that you had extended U-boot to use USB port on DM816x_EVM. Have your changes been merged to some code base ? Could you share your changes?

    Regards,

    Zinoviy.