summaryrefslogtreecommitdiff
path: root/src/stm/ao_usb_stm.c
diff options
context:
space:
mode:
authorBdale Garbee <bdale@gag.com>2012-05-16 09:13:53 -0600
committerBdale Garbee <bdale@gag.com>2012-05-16 09:13:53 -0600
commit6a973f788563ccc66b01cc7557a004dabef18d09 (patch)
treeffbc8faad73cde7934c4050deb840092430a311f /src/stm/ao_usb_stm.c
parentd387f246b24502642b76aad04eb3e0f1a5b78a05 (diff)
parentda2c920b9f3378d5a18551e008c1da5dace1e0ef (diff)
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Diffstat (limited to 'src/stm/ao_usb_stm.c')
-rw-r--r--src/stm/ao_usb_stm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/stm/ao_usb_stm.c b/src/stm/ao_usb_stm.c
index 71bf1bc7..c093f526 100644
--- a/src/stm/ao_usb_stm.c
+++ b/src/stm/ao_usb_stm.c
@@ -937,7 +937,7 @@ ao_usb_disable(void)
void
ao_usb_enable(void)
{
- uint16_t tick;
+ int t;
/* Enable SYSCFG */
stm_rcc.apb2enr |= (1 << STM_RCC_APB2ENR_SYSCFGEN);
@@ -985,6 +985,8 @@ ao_usb_enable(void)
(0 << STM_USB_CNTR_PDWN) |
(0 << STM_USB_CNTR_FRES));
+ for (t = 0; t < 1000; t++)
+ ao_arch_nop();
/* Enable USB pull-up */
stm_syscfg.pmc |= (1 << STM_SYSCFG_PMC_USB_PU);
}