Fix USB driver.
This commit is contained in:
committed by
NIIBE Yutaka
parent
4bde2ae1fc
commit
8e55209f33
@@ -1,3 +1,8 @@
|
||||
2019-10-07 Jeremy Drake <jeremy@drastrom.science>
|
||||
|
||||
* mcu/usb-st-common.c (usb_lld_init): Move BTABLE initialization
|
||||
after clearing ISTR register.
|
||||
|
||||
2019-09-04 NIIBE Yutaka <gniibe@fsij.org>
|
||||
|
||||
When it was exactly 64-byte, two ZLPs were sent wrongly.
|
||||
|
||||
@@ -235,10 +235,9 @@ usb_lld_init (struct usb_dev *dev, uint8_t feature)
|
||||
USB->CNTR = CNTR_FRES;
|
||||
USB->CNTR = 0;
|
||||
|
||||
USB->BTABLE = 0;
|
||||
|
||||
/* Clear Interrupt Status Register, and enable interrupt for USB */
|
||||
USB->ISTR = 0;
|
||||
USB->BTABLE = 0;
|
||||
USB->CNTR = (CNTR_CTRM | CNTR_OVRM | CNTR_ERRM
|
||||
| CNTR_WKUPM | CNTR_SUSPM | CNTR_RESETM);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user