Question
STM32L152 Nucleo and CubeMX
Posted on June 22, 2016 at 09:11
Hello,
yesterday I created a small program for STM32L152 Nucleo with CubeMX. It was running but MCO set to HSE gave only 4MHz with 75% duty cycle while I measured OSCin with 8MHz. After searching a while I found that there is a special setting for the HSE oscillator modul when using an external clock signal fed into OSCin. I found this setting prepared with defines in the HAL files and changed this line accordingly: RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS; //RCC_HSE_ON; Then everything was fine. Now my question is if there is a way to use this setting in the clock configuration tab in CubeMX. Otherwise I will have to correct it again any time I create new code with CubeMX. What seems strange to me is that I found no solution to this problem in the internet. Seems no one noticed before, although both are ST products. Any help is welcome Martin