Hi Kai,

> I am currently trying to make the Nucleo-F411RE board work.
> However, I am struggling with the clock configuration in the board-specific 
> .hpp file.
> If I try to compile, it tells me that the PLL factors are out of range.

> using systemClock = SystemClock<Pll<ExternalCrystal<kHz32>, MHz84, MHz48> >;

32kHz?  The big black crystal on the Nucleo board is the LSE-Oscillator, which 
drives the RTC.
Also: it's actually 32.768kHz == 2^15Hz cos RTC ;-P

You cannot use that input to drive the CPU frequency though, you need to use 
the 16MHz High-Speed-Internal clock for that.
Have a look at the Reference Manual Figure 12 (page 90) [1].

The SystemClock is a computation wrapper, that computes the PLL values and 
connects all the right clock sources for you.
Unfortunately this PLL computation only works on the F407, F303, F100, F429 and 
F469 at the moment.
We need to describe the entire clock tree and we've only implemented that for 
those devices.

I've created a ticket to remove the usage of the SystemClock completely from 
the examples, as it is obviously confusing and contra-productive for porting 

> I don't know how to use the Clock-Module so I am struggling a bit. I tried 
> getting some documentation on the usage, but I did not find any.
> Do you have any hint to point me in the right direction?

You can still do things manually using the xpcc::stm32::ClockControl, which is 
the underlying HAL.

Documentation for the F407 is available here, the clock module is identical for 
the F411:

I had a Nucleo-F411 lying around, so I ported xpcc over just now.
I cheated a little, cos I know all the Nucleo boards have the same layout, so I 
adapted the F103RB, which we already have ;-P

Note that I do not enable the external LSE crystal, as xpcc has no drivers for 
If you want to use it, you can enable it with this:


As a side note:
I had to upgrade the ST-Link firmware from v4 to v15, to get openocd to talk to 
this thing.
Maybe that's just my old board, but if `scons program` refuses to flash the 
chip, check out:

Hope that helps,

xpcc-dev mailing list

Reply via email to