Skip to content

Commit

Permalink
gateware.usb2: reset current speed, operating mode and termination se…
Browse files Browse the repository at this point in the history
…lect on exiting forced disconnect
  • Loading branch information
antoinevg committed Jun 7, 2024
1 parent f2b479a commit c546c84
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions luna/gateware/usb/usb2/reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,8 +532,12 @@ def elaborate(self, platform):

# Exit DISCONNECT once the Tddis timer has expired and self.disconnect is low.
with m.If((~self.disconnect) & tddis):
m.d.usb += tddis.eq(0)
m.d.usb += timer.eq(0)
m.next = 'START_HS_DETECTION'
m.d.usb += [
tddis.eq(0),
self.current_speed.eq(USBSpeed.FULL),
self.operating_mode.eq(UTMIOperatingMode.NORMAL),
self.termination_select.eq(1),
]
m.next = 'INITIALIZE'

return m

0 comments on commit c546c84

Please sign in to comment.