You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Luna as a HS USB wishbone peripheral in a SoC bootloader design for the ButterStick. I'd like to be able to disconnect the USB interface from firmware to support re-enumeration.
USBDevice.connect is a signal that is connected via the standard SoC interface, Which has the following description:
class USBDevice(Elaboratable):
Attributes
----------
connect: Signal(), input
Held high to keep the current USB device connected; or held low to disconnect.
If I hold connect low on power-up the device never appears, as expected. When I pull this signal high the device appears, as expected. However If the device is attached then pulling this signal low I'd expect the host to detect we've disconnected. But that is not the case.
The gateware seems to remove the termination if connect drops low.
But this results in termination being set to 0. Which is defined as HS_NORMAL
classUTMITerminationSelect:
""" Enumeration that specifies meanings of the UTMI TermSelect bit. """HS_NORMAL=0HS_CHIRP=1LS_FS_NORMAL=1
A quick fix I've found is to mask vbus_connected with self.connect. So that when we bring 'self.connect' LOW it's equivalent in logic to a vbus removal. With this in place the device correctly disconnects.
This works, but I'm not sure if this is the correct place to perform this mask.
I'm using Luna as a HS USB wishbone peripheral in a SoC bootloader design for the ButterStick. I'd like to be able to disconnect the USB interface from firmware to support re-enumeration.
USBDevice.connect
is a signal that is connected via the standard SoC interface, Which has the following description:If I hold connect low on power-up the device never appears, as expected. When I pull this signal high the device appears, as expected. However If the device is attached then pulling this signal low I'd expect the host to detect we've disconnected. But that is not the case.
The gateware seems to remove the termination if connect drops low.
But this results in termination being set to 0. Which is defined as
HS_NORMAL
A quick fix I've found is to mask
vbus_connected
withself.connect
. So that when we bring 'self.connect'LOW
it's equivalent in logic to a vbus removal. With this in place the device correctly disconnects.This works, but I'm not sure if this is the correct place to perform this mask.
The text was updated successfully, but these errors were encountered: