AnsweredAssumed Answered

clk frequency output problem

Question asked by Mohamed GORRAB on Apr 13, 2018
Latest reply on Apr 23, 2018 by Nawres GHARBI


I use the STM32CubeMX to send data using UART, but I have a clock frequency problem,
I configured the clk as shown on the picture below
logically, I should obtain 80MHZ as an outpout frequency, but when I use the scope, it is fixed all of the time at 16 MHZ if I use MSI or HSE as shown on the picture below
and it is fixed at 32 MHZ if I use the HSI,
I tried to use the different divisions /1, /8.. and the different clk (PPLCK, SYCLK, HSE...) to obtain the correct frequency, but everytime, I have the same frequency output that I showed on the scope,
The same problem, if I use the HAL_RCC_GetSysClockFreq() instruction, It gives 16 MHz and 32MHz values, we can't reach the 80MHz!!
below the code, 
We need to understand this contradiction to advance, because we use the baudrate variable in our project, and the baudrate depends on the frequency value!
Thanks in advance,