-
Notifications
You must be signed in to change notification settings - Fork 3k
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
STM32: LPUART clock source selection up to a serial driver #13929
Conversation
@JeanMarcR, thank you for your changes. |
e8cc5fa
to
00e27f0
Compare
@jeromecoutant |
#endif | ||
PeriphClkInitStruct.Lpuart1ClockSelection = RCC_LPUART1CLKSOURCE_LSE; | ||
|
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.
and endif after HAL_RCCEx_PeriphCLKConfig call ?
@JeanMarcR I fixed the title, please do not use all-capital title. |
The clock source selection of LPUART depends on System clocks but also on the serial baudrate. There is a specific computation done in serial driver targets/target_STM/serial_api.c At first start-up the LPUART1 clock selected in SetSysClock was anyway overridden by the serial driver, so this was of no effect. But in case of deep sleep SetSysClock is called again, while the driver isn't, so SetSyClock was corrupting the serial clock configuration. So let's remove these few lines of code which are causing trouble. For targets L496 and L5. Taking into account device TRNG in L5 configuration
00e27f0
to
41ed923
Compare
@jeromecoutant |
CI started |
Jenkins CI Test : ❌ FAILEDBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
CI restarted |
Jenkins CI Test : ❌ FAILEDBuild Number: 2 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
CI started |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 3 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
jenkins-ci/dynamic-memory-usage — internal error, I'll merge as the job was excluded yesterday |
The clock source selection of LPUART depends on System clocks but also on
the serial baudrate. There is a specific computation done in serial driver
targets/target_STM/serial_api.c
At first start-up the LPUART1 clock selected in SetSysClock was anyway
overridden by the serial driver, so this was of no effect. But in case
of deep sleep SetSysClock is called again, while the driver isn't, so
SetSyClock was corrupting the serial clock configuration.
So let's remove these few lines of code which are causing trouble.
For targets L496 and L5.
Summary of changes
Impact of changes
Migration actions required
Documentation
Pull request type
Test results
Reviewers