[DEV] HAL clock management API

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

[DEV] HAL clock management API

Postby Giovanni » Fri May 14, 2021 8:38 am

Hi,

Just a note, a clock management API has been added to HAL, it allows to switch clocks among multiple configurations (including potentially also power management).

Two configurations are pre-defined:
1) Reset, post-reset MCU state.
2) Default, settings in mcuconf.h.

More configuration can be defined by user.

So far it is just the API without implementations, there are several issues left:

1) All STM32 drives assume a static clock configuration and use macros to determine frequencies in the various clock sources.
2) In several places clocks are checked using preprocessor directives, this does not work if clocks can change at runtime.

The work ahead is to rework existing drivers to use the new system (while keeping compatibility with the old static one).

Giovanni

Return to “Development and Feedback”

Who is online

Users browsing this forum: No registered users and 30 guests