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.

OMAPL138 USB0 issue (usb dev bulk).

Other Parts Discussed in Thread: OMAP-L138, OMAPL138

We are developing a board with OMAP-L138.

We are using usb_dev_bulk example of OMAPL138_StarterWare_1_10_04_01 to use USB0 as usb device.

But After calling USBDBulkInit() function, this example is pended in while loop in my board.

------------------------------------------------------

...

USBDBulkInit()

...

while(1)

{

   ....

}

------------------------------------------------------

So we check BDEVICE bit value in the device control register(DEVCTL) in our board and OMAP-L138 SOM-M1 (EVM) board. The datasheet of OMAP-L138 say that this read-only bit indicates whether the USB controller is operating as the 'A' device or the 'B' device.

The EVM board gets this bit as '1', but Our board gets it as '0'. I found that the cable that we use makes the USB controller operate as the 'A' device or the 'B' device. but i don't understand why these boards get different value even though using Mini-B Type cable in two board.

I think that this causes this problem in my board because i can only find different thing between the EVM board and our board.

So Please tell me anything to able to cause this problem and the way to solve this problem. please.

Thanks,

Young-Geun, LIM

  • Hi,
    This function will return NULL on failure case or the device pointer on the successful completion.
    We must call this function to initialize the USB controller for make use of a USB bulk communication channel.
    Please refer the section "How to Write a New Bulk Application" at the below wiki article to debug the issue.
    http://processors.wiki.ti.com/index.php/StarterWare_USB#Bulk_Device_Class

  • Thank you for your reply.

    I already read the article that you recommended and the function the device pointer successfully.

    The usb_dev_bulk exmple of OMAPL138_StarterWare_1_10_04_01 works well in my OMAP-L138_SOM-M1 board.

    This only doesn't work on our board that we are developing.

    I compared the log that theses two board give by adding print() in usblib sources that are included in OMAPL138_StarterWare_1_10_04_01. I found that our board only can't call HandleDisconnect() function when pulling out the usb cable from board. This function is called by USBDeviceIntHandlerInternal() function that is called when USB interrupt occurs. USBDeviceIntHandlerInternal() funtion calls HandleDisconnect() function when USB interrupt status register is disconnect status.

    And I also check D+ line with an oscilloscope. On EVM board this signal is low while the usb cable is connected to board and this signal is changed high when removing the cable from the board and then soon later this changes to low again. HandleDisconnect() function is called at this time.

    But On my board this signal changes from low to high when removing the cable and then this doesn't change status as low. It keeps high status.

    I want to know what makes this signal change and why this happens.

    Please, tell me any information about this.

    Thank You.

    Young-Geun, LIM