Skip to content

Issue with USB Host and D+/D- pulldown resistors #51

@jeromeDms

Description

@jeromeDms

Hi All
I've a USB Host project based on M482LGCAE, where we added pulldown resistors on the USB D+/D- data lines.
All work fine except with some devices, that are not working when directly connected to the M482 and working when connected through a USB hub.
Compared to the evaluation board NuMaker M483, the devices work when directly attached to the M483.
The main difference are the pulldown resistors that are not used in the NuMaker board.
Our board fails with usbh_set_address() returning timeout -203.

What I found is when the device is detected in the ohci_rh_polling() function, the call to connect_device() results in the following difference when comparing our board (with pulldown resistors) to the NuMaker board :

In connec_device() from usb_core.c :

delay_us(100 * 1000); /* initially, give 100 ms delay */
usbh_get_device_descriptor(udev, &udev->descriptor);
reset_device(udev);
delay_us(100 * 1000);
ret = usbh_set_address(udev);

When I set a breakpoint before calling reset_device(), the device seems unconnected in our board, while it is still connected in the NuMaker.

Our board :

Image

NuMaker board :

Image

We see in our board the PESC bit is set meaning the port was disabled by a hardware change.

I would be happy to read some tips of what can be done here, as I cannot remove the pulldown resistors on existing products.
I tried to re-reset the USB device by disabling alternate functions on D-/D+ lines, putting those lines low for 20ms and re-enabling the alternate function, without success.

Thanks for any tips you can provide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions