boards: set stm32 based boards LSI by default #8370
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contribution description
Some board configurations can vary according to the revision, especially on ST discovery and nucleo development boards.
This PR sets the default low speed clock source to LSI, which is always present regardless of the revision. While I acknowledge the preference for LSE (more accurate), for the sake of functionality, LSI should be set by default, unless we know all revisions have LSE. Otherwise, boards simply don't work when RTC is used, and it's used by default on all ST platforms.
According to UM1724, revision MB1136 C-01 on, as far as I can tell, all nucleo64 boards don't have neither HSE and LSE, thus risk to be broken on master.
In this PR I'm only fixing nucleo-l152 and stm32f4doscovery, but I'd advice to change all to LSI by default. Comments welcome!
Issues/PRs references
#7504 (3897d00) enabled LSE on nucleo-l152 and #7158 (b3e7dd8) for stm32f4discovery
Fixes #8240, though is already closed.