cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeL4 1.9.0 CubeMx 4.22.1

ax0018
Associate III
Posted on September 14, 2017 at 22:45

There might be an ADC clock issue when the project is configured with CubeMx 4.22.1 and 1.9.0 CubeL4.

When SAI clock is selected for ADC in CubeMx the HAL_RCCEx_PeriphCLKConfig called by SystemClock_Config returns HAL_ERROR.

Everything works if SYSCLK is selected as ADC clock##.

SAI clock configuration works correctly with the previous versions of CubeMx and CubeL4 libraries.
1 REPLY 1
ax0018
Associate III
Posted on September 16, 2017 at 02:58

It looks like it's CubeMx problem: PLLM division factor for PLL is not included in automatically generated SystemClock_Config function. Adding initialization of PLLM manually fixed the problem.