diff --git a/os/hal/ports/STM32/STM32L4xx+/hal_lld.h b/os/hal/ports/STM32/STM32L4xx+/hal_lld.h index 91103f013..d6ef1ab88 100644 --- a/os/hal/ports/STM32/STM32L4xx+/hal_lld.h +++ b/os/hal/ports/STM32/STM32L4xx+/hal_lld.h @@ -1474,6 +1474,11 @@ /* * PLLSAI1 enable check. */ +#if ((STM32_SAI1SEL == STM32_SAI1SEL_OFF) && \ + (STM32_CLK48SEL == STM32_CLK48SEL_PLLSAI1) || \ + (STM32_ADCSEL == STM32_ADCSEL_PLLSAI1)) +#error "PLLSAI1 is off and cannot supply CLK48 or ADC" +#endif #if (STM32_SAI1SEL == STM32_SAI1SEL_PLLSAI1) || \ (STM32_SAI2SEL == STM32_SAI2SEL_PLLSAI1) || \ (STM32_CLK48SEL == STM32_CLK48SEL_PLLSAI1) || \ diff --git a/readme.txt b/readme.txt index 801b10751..30e5439b5 100644 --- a/readme.txt +++ b/readme.txt @@ -84,6 +84,8 @@ - NEW: EFL driver and demo for STM32F3xx. - NEW: New unit test subsystem under /os/test. Now it is officially ChibiOS/TEST. +- FIX: SMT32L4+ hangs in clock init when ADC or CLK48 use PLLSAI1 and + PLLSAI1 is set to OFF (bug #1196). - FIX: Fixed ARMCMx port, MPU not enabled when PORT_ENABLE_GUARD_PAGES is set (bug #1195)(backported to 20.3.4)(TBP to 21.6.1). - FIX: Fixed removed incorrect ADCv4 checks for MONEN (bug #1194)