Skip to content

Commit 7bab48b

Browse files
EmilieNumworksLeaNumworks
authored andcommitted
[ion] DFU driver: fix action following enumeration interruption
An end-point reset was added to fix a enumeration problem. But, it triggered another issue: the calculator freezes because of a SEDET (end of session) detection. Plus, the initial bug doesn't seem to exist now.
1 parent aaf2c1c commit 7bab48b

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

ion/src/device/shared/usb/stack/device.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ void Device::poll() {
7373
/* After a USB reset, the host talks to the device by sending messages to
7474
* address 0; */
7575
setAddress(0);
76-
// Flush the FIFOs
77-
m_ep0.reset();
7876
m_ep0.setup();
7977
/* In setup(), we should set the MPSIZ field in OTG_DIEPCTL0 to the maximum
8078
* packet size depending on the enumeration speed (found in OTG_DSTS). We

ion/src/device/shared/usb/stack/endpoint0.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,7 @@ void Endpoint0::flushTxFifo() {
186186
OTG.DIEPCTL0()->setSNAK(true);
187187

188188
// Wait for core to respond
189-
// TODO: understand why !OTG.GOTGINT()->getSEDET() is required since verion 16
190-
while (!OTG.DIEPINT(0)->getINEPNE() && !OTG.GOTGINT()->getSEDET()) {
189+
while (!OTG.DIEPINT(0)->getINEPNE()) {
191190
}
192191

193192
// Get the Tx FIFO number

0 commit comments

Comments
 (0)