You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I too am kind of interested in standby mode, but the RCC is not the easiest thing to modify and get right. Exposing enr would allow you to break all abstractions since you could disable devices that are assumed to be enabled after initialisation.
Everything dealing with the backup domain was implemented after lots of discussions here #17.
When enabling standby mode, there is a need to set
PWREN
bit in APB1 ENR register.Right now it can be achieved by calling
constrain
onrcc.bkp
. https://github.com/stm32-rs/stm32f1xx-hal/blob/master/src/rcc.rs#L367And while it does set the right bits in the right places, it enables other registers as well, which may to may not be desirable.
Ideally, I'd like to be able to do it manually:
Or maybe just call a function that does it for me, something like what
set_sleepdeep()
does: https://github.com/rust-embedded/cortex-m/blob/master/src/peripheral/scb.rs#L585I'd be happy to provide a PR for that, I'm just not entirely sure which is the best way to approach this issue.
The text was updated successfully, but these errors were encountered: