AnsweredAssumed Answered

HSI, HSE, LSI, LSE and clock nonsense

Question asked by Rami Rosenbaum on Feb 22, 2017
Latest reply on Feb 24, 2017 by Clive One

Hi,

I'm working on a stm32F101CBT6.

The board has a 16 MHz HSE (connected to PD0.PD1) and a 32.768 KHz LSE (connected to PC14/PC15).

The board will use SPI1, SPI2, USART1, USART2, I2C1 and a few GPIOs.

 

I've worked with ST microcontrollers before, but never had to configure the clocks, so I'll be probably asking some naive questions, please be gentle... I do know that external oscillators are much more precise than the internal ones.

 

When creating a new project with CubeMX, it defaults to HSI and LSI.

If I enable MCO (PA8) and listen with an analyzer - I get 8 MHz. That seems correct.

 

1. If I configure the clock configuration, via CubeMX, to use HSE with 16 MHz (the board schema says 16 MHz) - I see on MCO 16.67 MHz. Is that correct?

 

2. What is the logic, the aim of playing with the PLL, and - should I use it?

My common sense says I should aim for the highest frequency in the SYSCLK and the buses.

 

I've attached my CubeMX project file, if it helps.

 

Thanks

Attachments

Outcomes