Complete support for all 115 chips from the STM32F4 family was added to the Kconfig configuration system and to the source code of distortos.
Two more example configurations for popular boards with these chips were also added, so there are now three tested, ready to run configurations:
- classic STM32F4DISCOVERY board with STM32F407VG chip (168MHz max),
- 32F429IDISCOVERY board (also known as STM32F429-DISCO) with STM32F429ZI chip (180MHz max),
- small and very cheap NUCLEO-F401RE board with STM32F401RE chip (84MHz max).
All these configurations run the test application at the max possible system clock frequency. Whole configuration of the clock system frequency and some details from the power system is done with the Kconfig configuration tool, presented on the screenshots below.
The correctness of the selected configuration is verified partly in the Kconfig tool and partly in the source code, using only compile-time methods (static_assert(...)
or preprocessor). Verified items are:
- values – whether the selected value is in allowed range or in set of allowed values,
- dependencies – e.g. overdrive mode requires supply voltage above 2.1V and voltage scale mode must be set to 1,
- chip variations – e.g. not all voltage scale modes are supported by all chips, only some chips have overdrive mode,
- final setting – e.g. whether entered configuration results in valid frequencies for selected chip.
With all these checks in place, the chance of creating an invalid configuration is almost zero. This way one can focus on the development of the application instead of low-level details of hardware configuration.
This standard clock configuration is completely optional – it can be disabled with just one checkbox. In that case all you have to do is enter the SYSCLK frequency and bus dividers for AHB and APBs. And – obviously – you have to configure the clocks yourself to match these settings (; .