From c5c7e44f8c52159790ce2bf0cc834f86fbf80d55 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 23 Dec 2013 08:46:02 +0000 Subject: [PATCH] Added BOARD_OTG_NOVBUSSENS option. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6575 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32/OTGv1/usb_lld.c | 5 +++++ readme.txt | 1 + 2 files changed, 6 insertions(+) diff --git a/os/hal/platforms/STM32/OTGv1/usb_lld.c b/os/hal/platforms/STM32/OTGv1/usb_lld.c index 35b5335e5..978acea90 100644 --- a/os/hal/platforms/STM32/OTGv1/usb_lld.c +++ b/os/hal/platforms/STM32/OTGv1/usb_lld.c @@ -889,7 +889,12 @@ void usb_lld_start(USBDriver *usbp) { otgp->PCGCCTL = 0; /* Internal FS PHY activation.*/ +#if defined(BOARD_OTG_NOVBUSSENS) + otgp->GCCFG = GCCFG_NOVBUSSENS | GCCFG_VBUSASEN | GCCFG_VBUSBSEN | + GCCFG_PWRDWN; +#else otgp->GCCFG = GCCFG_VBUSASEN | GCCFG_VBUSBSEN | GCCFG_PWRDWN; +#endif /* Soft core reset.*/ otg_core_reset(usbp); diff --git a/readme.txt b/readme.txt index 5a81fc76b..4135aefcd 100644 --- a/readme.txt +++ b/readme.txt @@ -141,6 +141,7 @@ (backported to 2.6.0). - FIX: Fixed MS2ST() and US2ST() macros error (bug #415)(backported to 2.6.0, 2.4.4, 2.2.10, NilRTOS). +- NEW: Added BOARD_OTG_NOVBUSSENS board option for STM32 OTG. - NEW: Added SPI4/SPI5/SPI6 support to the STM32v1 SPIv1 low level driver. - NEW: Added chvprintf() and chsnprintf() functions to the chprintf module. - NEW: Improved time range check in the kernel, new API chTimeElapsedSince()