From c9726505130797f21f6f4cc06ea55f289b9dcad2 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Sun, 22 Jan 2012 23:06:07 +0100 Subject: USB pins should all be configured as AF with no pullup. --- main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index e56c435..baad038 100644 --- a/main.cpp +++ b/main.cpp @@ -52,12 +52,14 @@ int main() { led_red.on(); led_blue.off(); - usb_vbus.set_mode(Pin::Input); + usb_vbus.set_mode(Pin::AF); + usb_vbus.set_pull(Pin::PullNone); + usb_vbus.set_af(10); usb_dm.set_mode(Pin::AF); usb_dm.set_pull(Pin::PullNone); usb_dm.set_af(10); usb_dp.set_mode(Pin::AF); - usb_dp.set_pull(Pin::PullUp); + usb_dp.set_pull(Pin::PullNone); usb_dp.set_af(10); RCC.enable(RCC.OTGFS); -- cgit v1.2.3