cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L152 Nucleo and CubeMX

mmensch
Associate II
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

2 REPLIES 2
Walid FTITI_O
Senior II
Posted on June 22, 2016 at 13:38

Hi Mr_M_from_G,

I see now what you have missed. The configuration window at the left of Pinout tab contains the main configuration of the MCU peripheral that you can select/switch. For other detailed configuration , you can go to ''Configuration tab -> Peripheral bottom'' and select/ modify parameters there.

-Hannibal-
mmensch
Associate II
Posted on June 23, 2016 at 09:01

Hello all,

I found myself, it is in the pinout tab under RCC -> High Speed Clock

Martin