New family of chips is supported by distortos since today! It is now possible to use any of 94 STM32F1 chips – they are all available in Kconfig configuration system and supported by source code. This addition increases total number of chips supported by distortos to 209.
Configuration of chip’s clocks and PLLs can be done entirely in Kconfig configuration tool – just as for STM32F4.
All selected options are verified either by Kconfig configuration tool or by compile-time checks in source code (
static_assert(...) or preprocessor). The checks range from simple value verifications (whether the value is in allowed range), through dependency checks (e.g. you cannot select HSE clock as source of PLL without enabling it), through chip variations (e.g. different chips have different allowed range for PLL multiplier, some chips have additional PLLs) to validation of final setting (e.g. whether all clock-related options result in valid frequencies for the selected chip). All of that makes creating a wrong configuration (almost (; ) impossible, greatly simplifying new hardware bring-up and reducing time required to implement low-level chip initialization.
Just as with other supported chip family – STM32F4 – this standard configuration of clock can be easily disabled in Kconfig configuration tool. You then have to enter the value of SYSCLK frequency and dividers for AHB and APB buses. How you configure the clocks is entirely up to you in that case – just make sure that the real settings match the declared values.