STM32 USBv1 updated for dynamic clocking.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14388 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Giovanni Di Sirio 2021-05-17 12:59:05 +00:00
parent 5e3c3d0dcb
commit 80338e1749
4 changed files with 7 additions and 7 deletions

View File

@ -477,6 +477,11 @@ void usb_lld_start(USBDriver *usbp) {
/* Clock activation.*/
#if STM32_USB_USE_USB1
if (&USBD1 == usbp) {
osalDbgAssert((STM32_USBCLK >= (48000000U - STM32_USB_48MHZ_DELTA)) &&
(STM32_USBCLK <= (48000000U + STM32_USB_48MHZ_DELTA)),
"invalid clock frequency");
/* USB clock enabled.*/
rccEnableUSB(true);
/* Powers up the transceiver while holding the USB in reset state.*/

View File

@ -166,11 +166,6 @@
#error "invalid STM32_USB_48MHZ_DELTA setting, it must not exceed 250000"
#endif
#if (STM32_USBCLK < (48000000 - STM32_USB_48MHZ_DELTA)) || \
(STM32_USBCLK > (48000000 + STM32_USB_48MHZ_DELTA))
#error "the USB driver requires a 48MHz clock"
#endif
/*===========================================================================*/
/* Driver data structures and types. */
/*===========================================================================*/

View File

@ -1345,7 +1345,7 @@
* @brief LPTIM1 clock frequency.
*/
#if (STM32_LPTIM1SEL == STM32_LPTIM1SEL_PCLK1) || defined(__DOXYGEN__)
#define STM32_LPTIM1CLK hal_lld_get_clock_point(CLK_PCLK1
#define STM32_LPTIM1CLK hal_lld_get_clock_point(CLK_PCLK1)
#elif STM32_LPTIM1SEL == STM32_LPTIM1SEL_LSI
#define STM32_LPTIM1CLK STM32_LSICLK

View File

@ -74,7 +74,7 @@
*****************************************************************************
*** Next ***
- NEW: USARTv2, USARTv3 updated for dynamic clocking.
- NEW: STM32 USARTv2, USARTv3 updated for dynamic clocking.
- NEW: Dynamic support implemented for STM32G4xx.
- NEW: Dynamic clocks support in HAL.
- NEW: Reload feature added to RT virtual timers.