Showing results for 
Search instead for 
Did you mean: 

Bringing clock system configuration from NUCLEO-F207 board to stm32F207 based board

Associate III

I'm trying to run an application that works fine on the nucleo board environment on a custom board using the same mcu.

It's my first time and I'm using a protype pcb version with a very single circuitry.

I was working over a firmware example with HAL based drivers for Nucleo and I wrote application level code (user code, msp, it.. files). I was playing with freertos and leds. I was still keeping the system clock configuration whereas it was executed on Nucleo board.

Example works with HSE clock. As shown on the NUCLEO board and its given schematics I can see there is no mounted piece on HSE mcu pads. According schematics HSE seems to be an external source that comes from the integrated st-link circuit area (from the second mcu device). It's called bypass clock source.

I've also played with HSI clock source and it also works fine on NUCLEO board.

I'm wondering some things about clock sourcing and clock system configuration on a stm32f207 stand-alone microcontroller.

  1. The first one could be a silly or obvious question but I'm not sure about the answer. Could physically be a crystall resonator/oscillator on those pins even if the application finally is configured for using HSI as a system clock? Could the physicall presence of a crystall cause clock system missfunction when HSE is not used?
  2. I'm trying to bring the same application execution to my stm32f207 microcontroller. How can I configure the system clock in order to not cause setup problems trying to do the same code execution that was done on nucleo board?
  3. If the hw design that board implements a SWD port, no external crystall is connected in order to use HSI, using CubeMx, using HAL driver Layers and using SEGGER J-link debugger... How to adjust some main blocks on CubeMx tool. Should I have special consideration about something in particular regarding firmware configuration for SWD pins, clock config, etc..? I asked this because I'm having problems after HAL_init() call on my app ( running on my custom board) and I'm trying to discard if it's a hardware design issue or a firmware configuration one. Systick interruptions never happens and clock configuration doesn't returns a HAL_OK error code any time. But the same is working fine on the Nucleo board.

ST Employee
  1. It doesn't matter if you have a crystal connected to the HSE pins and still use HSI, the HSI is not affected by the crystal and the crystal is only connected superfluously and without function.
  2. In fact, on most NUCLEO the output MCO of the ST-LINK (8MHz on the F207) is used as the clock for the target MCU in bypass mode because that saves a crystal. If you want to run the same application on your STM32F207, all you need to do (without embedded ST-LINK) is to connect an 8MHz crystal and the corresponding load capacitors to HSE, configure HSE to Crystal/Ceramic Resonator in the RCC block and adjust the clock configuration if necessary (if using another crystal frequency).

Does it answer your question?



In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Sorry, I probably was a little vague explainig what I need. But thanks for your answer. It was useful and it perfectly answers the questions I made.

I will add a third question and more info about any kind of stm32f207 based board.

Thanks a lot for your answer.