-
Notifications
You must be signed in to change notification settings - Fork 39
Remove usage of SystemClock from examples #139
Comments
I think that's a step back for the most supported platforms like STM32F407 Discovery Board. At least leave a hint what's the better alternative to using the fake SystemClock. |
I disagree. This code is fundamentally broken and it is absolutely incomprehensible for anyone not deeply involved with the SystemClock. I'm not saying we'll remove the code, so you'll still be able to use SystemClock in your code. I'm also not sure if SystemClock is even possible with complex clock trees, due to them being graphs, rather than pure trees. (See #39). |
How about adding a porting guide to the While it is difficult to implement, I still think, that the static clock interface is a good idea.
@salkinium can you point me at a concrete example, for which the concept does not work? |
Drop everything and start writing. Now!
I'm not debating the usefulness of SystemClock. It is basically the same issue as with the linkerscripts before they were generated. At the moment you can choose to do two things:
Given that choice, I'd go for 2.
The issue is understanding and parsing ST clock graph data to get to this form (or comparable).
The STM32F072 for example has shortcuts in the "tree" (see USART1). RTC and Watchdog don't fit well either. ADC have their own clock. |
xpcc::stm32::SystemClock
is a really nice interface, but it cannot easily be ported to new chips.I'd prefer to replace all occurances of SystemClock in the examples with the fake SystemClock approach, which makes it easier to port to new boards.
The fake SystemClock uses
xpcc::stm32::ClockControl
, which is ported for a much, much wider range of devices.The text was updated successfully, but these errors were encountered: