pico-feedback icon indicating copy to clipboard operation
pico-feedback copied to clipboard

[DOCUMENTATION] No information on how to use RESET_BUS in USB Host mode

Open shreeve opened this issue 1 year ago • 7 comments

Table 403. SIE_CTRL Register near page 400 (Section 4.1) shows that Bit 13 - RESET_BUS will reset the bus. However, there is no documentation on how this works or what to do and TinyUSB doesn't do anything (the line of code says "// TODO: Nothing to do here yet. Perhaps need to reset some state?").

Can documentation be added to show how to use RESET_BUS in USB Host mode?

shreeve avatar Feb 29 '24 04:02 shreeve

Thanks @aallan -- Just to check on this, is this an ok place to ask the question? I don't see any reference in the datasheet and I'm not sure where else to ask. The TinyUSB code has basically a nop for the USB bus reset. I'm not sure who else to ask, since I don't see it in the documentation and the reference implementation doesn't use or mention how to do a USB bus reset.

shreeve avatar Mar 02 '24 04:03 shreeve

2024-03-06 14-45-04 - USB Enumeration — CherryUSB 1 1 0 Documentation

shreeve avatar Mar 06 '24 21:03 shreeve

@liamfraser is probably the person to ask.

aallan avatar Mar 07 '24 10:03 aallan

(...who is currently on holiday this week :wink: )

lurch avatar Mar 07 '24 12:03 lurch

The bus reset is issued automatically by the USB Host's "line state" state machine. This is the state machine that detects when a device is connected, issues a bus reset etc according to the USB spec. If you wanted to retrigger a bus reset (and the whole state machine) this can be achieved by removing vbus detect (USB_PWR register) and then reasserting it. Alternatively you could manually force an SE0 bus condition using the DIRECT_EN, DIRECT_DP, DIRECT_DM. I would advise against this as the controller may then be in an unknown state.

liamfraser avatar Mar 11 '24 09:03 liamfraser

Excellent information! Thank you.

shreeve avatar Mar 11 '24 16:03 shreeve

Is there any use for the RESET_BUS then?

shreeve avatar Mar 11 '24 16:03 shreeve