cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F439NIH can't get PLLCLK on MCO1 (solved)

lasse
Associate II
Posted on February 17, 2017 at 12:29

I want to have 60 MHz on the MCO1 pin PA8. I use an external 25 Mhz crystal. The PLL delivers 180 Mhz to the system clock. I've used STCubeMX to configure the clocks to get 180 MHz / 3 on MCO1.

Unfortunatly I'm not getting any activity on the MCO1 pin at all.

Some things I've tried:

- Checking the registers in the debugger, looks correct.

- Setting MCO1 register to 0x02 for using HSE. This works fine, I'm getting pulses on MCO1

- Setting PLL down to 75 Mhz. No activity on MCO1.

Is this some limitation or erratta that I somehow missed in the documentation?

1 ACCEPTED SOLUTION

Accepted Solutions
lasse
Associate II
Posted on February 17, 2017 at 12:41

Solved!

In MX_GPIO_Init() the GPIO speed setting was

  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;

Changed it to:

  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;

This can also be done in CubeMX under RCC configuration -> GPIO

Funny thing is, that the port is actually set up for VERY high speed in  HAL_RCC_MCOConfig() but this is called before MX_GPIO_Init()

View solution in original post

2 REPLIES 2
lasse
Associate II
Posted on February 17, 2017 at 12:41

Solved!

In MX_GPIO_Init() the GPIO speed setting was

  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;

Changed it to:

  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;

This can also be done in CubeMX under RCC configuration -> GPIO

Funny thing is, that the port is actually set up for VERY high speed in  HAL_RCC_MCOConfig() but this is called before MX_GPIO_Init()

feuerwolf
Senior

HAL_EnableCompensationCell();

might be necessary for higher clock frequencies