-
Notifications
You must be signed in to change notification settings - Fork 1.3k
STM32: Set correct crystal settings on Discovery boards #2979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hierophect I've checked the 2 boards I have. The disco is fine, the nucleo is not correct. Could you give me details though about how to do a real low-power test so that I can be sure everything is fine.
@hierophect#2551 Not sure what you're doing with this PR, what's wrong with the LSE on H7/F7? |
@k0d @tannewt Unfortunately, it looks like I can't mess with the settings on the F7 or H7s without messing up their boot behavior. I thought it was just the Nucleos after my first round of testing but now I'm having issues on the H746 discovery as well. What these boards need is a full implementation of the low power domain initialization code for the H7 and F7. I can work on that this week but for now I've made a TODO comment for each of them so this can at least still be submitted as a hotfix for the Discovery F4. |
@k0d Right now, the new low power code in port.c has some caused problems with certain combinations of settings that cause boards to fail to boot if their oscillator settings don't match the actual board or the settings in Unfortunately this does make this PR a bit anemic as-is... it does at least fix the Discovery F4, which is why I made it in the first place. But perhaps I should just rework it completely into a general low power settings fix across all boards. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good interim fix for these boards while we sort out the crystal init. Merging for the next beta. Thanks!
During the implementation of low power mode a couple of Discovery boards were mistakenly marked as having low power crystals, but actually only have DNP slots that require the user to install them. This resulted in these dev boards being unable to boot fully due to infinite loops on failure in some of the STM32 HAL functions.
This PR sets the Discovery boards crystal settings based on their manual data, which should help with the boot problems. Unfortunately, I don't have most of the Disco boards on my desk at the moment so any help testing these changes would be appreciated.