STM32F401CCU6 LQFP100 (!) development board

Limited support for STM32F4 Discovery, Nucleo and custom F4 boards
Posts: 243
Joined: Thu Mar 07, 2019 6:15 am
OS: linux
IDE: eclipse, arduino 1.8.5
Core: Roger's
Board: Maple mini, Bluepill

Re: STM32F401CCU6 LQFP100 (!) development board

Post by ag123 » Sun Jan 19, 2020 3:03 pm

oops misposted
reposted in the official stm32duino forum as well ... p=714#p714

hi steve,

i think we need to rework the clock setting f4 code.
blackpill f411 runs on a 25mhz crystal
disco f411 runs on a 8mhz crystal ... f411.h#L41

my thoughts are either to do like the official core
the system clock config is defined in the variant itself ... t.cpp#L106

or we can do something similar to libopencm3
we can have the variant maintain a structure containing some clock setups ... /rcc.c#L52

Code: Select all

	{ /* 84MHz */
		.pllm = 16,
		.plln = 336,
		.pllp = 4,
		.pllq = 7,
and a call back function needs to be defined in the variant to return the structure, it can even be a static structure or class that needs to be defined in the variant, initialized at reset so that the rcc_init_clocks() would look for those values in that structure.
but i just thought that this approach may lead to ifdefs, while the variant call back can be a fixed function to return a fixed structure

Post Reply