cancel
Showing results for 
Search instead for 
Did you mean: 

SOLVED: STM32L151 MCO/PLL doesn't configure after reset

gregknoll
Associate
Posted on August 20, 2015 at 17:14

I want to avoid using a 12MHz external crystal for another IC, so I set the MCO to the PLL, with the HSI feeding the PLL.  It works great when I flash the chip, but after a reset, it doesn't work.  Everything else in the program functions fine.  If I re-flash the STM, it works again until reset.

EDIT: It was a pin config problem. I moved the function that setup the MCO to the beginning of the code without moving the GPIO clock init with it.  

This thread can be closed.

#reset #pll #stm32l151 #mco
1 REPLY 1
Nesrine M_O
Lead II
Posted on August 21, 2015 at 13:09

Hi G,

“I moved the function that setup the MCO to the beginning of the code without moving the GPIO clock init with it.�?

After reset, all GPIOs are in input mode. So you should reconfigure MCO pin in alternate function mode after reset (SystemInit after PLL activation).

-Syrine-