Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


Problem STM32F407G-DISC1 STM32F407G-DISC1 StdPeriph HSE_VALUE PLL_M

Hi,

and thank-you to ac6 for providing us the “System Workbench for STM32”.

Creating a new C project and due to board selection “STM32F407G-DISC1” and
“StdPeriph” library usage, SW4STM32 generates:

a) file “stm32f4xxh” which contains no “#define STM32F407G” but:

  1. if defined(STM32F40_41xxx)
    defined(STM32F427_437xx)
    defined(STM32F429_439xx)
    defined(STM32F401xx)
    \
defined(STM32F410xx)
defined(STM32F411xE)
defined(STM32F469_479xx)

#if !defined (HSE_VALUE)
#define HSE_VALUE ((uint32_t)25000000) /*!< Value of the External oscillator in Hz */
#endif /* HSE_VALUE */

and therefore will set “HSE_VALUE” to 25000000 insteed of 8000000

b) file “system_stm32f4xx.c” contains no “#define STM32F407G” but:

  1. if defined(STM32F40_41xxx)
    defined(STM32F427_437xx)
    defined(STM32F429_439xx)
    defined(STM32F401xx)
    defined(STM32F469_479xx)

#define PLL_M 25

and therefore will set “PLL_M” to 25 insteed of 8.

Why happens this?
What can I do to let MCU run with 168 MHz (without manipulating above generated files)?

Albert