Affordable and flexible platform to ease prototyping using a STM32F302R8T6 microcontroller.

Automatic clock configuration

01 Apr 2014

An automatic clock configuration is implemented in the F302R8 SDK.

First, try to start with the external 8MHz clock coming from the MCO of the ST-LINK board part. Note that some solder bridges must be closed/opened.

Second, if the start with the external clock failed, then try to start with the external 8MHz quartz. Note that this quartz must be added on the board as well as capacitors and resistors.

For more information on these two above points, please read the Nucleo board user manual (OSC clock chapter): http://www.st.com/st-web-ui/static/active/en/resource/technical/document/user_manual/DM00105823.pdf

Third, if the start with external quartz is failed, then start with the internal HSI 8MHz clock.

Clock setting summary:

-----------------------------------------------------------------------------
 System clock source                | 1- PLL_HSE_EXTC        | 3- PLL_HSI
                                    | (external 8 MHz clock) | (internal 8 MHz)
                                    | 2- PLL_HSE_XTAL        |
                                    | (external 8 MHz xtal)  |
-----------------------------------------------------------------------------
 SYSCLK(MHz)                        | 72                     | 64
-----------------------------------------------------------------------------
 AHBCLK (MHz)                       | 72                     | 64
-----------------------------------------------------------------------------
 APB1CLK (MHz)                      | 36                     | 32
-----------------------------------------------------------------------------
 APB2CLK (MHz)                      | 72                     | 64
-----------------------------------------------------------------------------
 USB capable (48 MHz precise clock) | YES                    | NO
-----------------------------------------------------------------------------