git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4274 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2012-06-13 17:07:30 +00:00
parent f620f29e0a
commit 25d731ed0b
1 changed files with 3 additions and 0 deletions

View File

@ -775,6 +775,9 @@ void usb_lld_reset(USBDriver *usbp) {
OTG->GRXFSIZ = STM32_USB_OTG1_RX_FIFO_SIZE / 4; OTG->GRXFSIZ = STM32_USB_OTG1_RX_FIFO_SIZE / 4;
otg_rxfifo_flush(); otg_rxfifo_flush();
/* Resets the device address to zero.*/
OTG->DCFG = (OTG->DCFG & ~DCFG_DAD_MASK) | DCFG_DAD(0);
/* Enables also EP-related interrupt sources.*/ /* Enables also EP-related interrupt sources.*/
OTG->GINTMSK |= GINTMSK_RXFLVLM | GINTMSK_OEPM | GINTMSK_IEPM; OTG->GINTMSK |= GINTMSK_RXFLVLM | GINTMSK_OEPM | GINTMSK_IEPM;
OTG->DIEPMSK = DIEPMSK_TOCM | DIEPMSK_XFRCM; OTG->DIEPMSK = DIEPMSK_TOCM | DIEPMSK_XFRCM;