-
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
STM32WB RNG: enable use from both M4 and M0+ cores #13219
Conversation
@@ -58,6 +59,9 @@ void hal_deepsleep(void) | |||
PWR_EnterStopMode(); | |||
PWR_ExitStopMode(); | |||
|
|||
/* Force complete clock reconfiguration */ | |||
SetSysClock(); |
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 generic way indeed to restart all the clocks. But it can take time and have impacts on power consumption. What is actually missing at this point, is it only HSI48 ?
if so, isn't it enough to call again :
while` (LL_HSEM_1StepLock(HSEM, CFG_HW_HSI48_SEMID));
of course that's an optimization only
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.
Idea was to ease maintenance.
If we change something in SetSysClock, it will be automatically taken into account at STOP mode exit.
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.
But it can take time and have impacts on power consumption.
what we are losing here ? Any numbers?
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.
But it can take time and have impacts on power consumption.
what we are losing here ? Any numbers?
No measure, but I don't think this takes more time than switching only HSI48 clock here.
@jeromecoutant, thank you for your changes. |
CI started |
Test run: SUCCESSSummary: 6 of 6 test jobs passed |
Thanks @jeromecoutant for this patch! |
Summary of changes
When M0+ CPU with BLE and M4 CPU with MBED application are using both RNG feature,
there was some conflict in clock configuration.
Now, M4 CPU is set as the master.
Fix #13145
@ARMmbed/team-st-mcd
@eriknayan
Impact of changes
This enables RNG use in MBED application in parallel of BLE.
This could also improve USB use as USB is sharing the same clock as RNG in STM32WB
Migration actions required
Documentation
Pull request type
Test results
Reviewers