STM32F446 project. I'd prefer to use an external oscillator for HSE instead of the usual crystal. I'd setup HSE in the RCC to be in bypass, and my understanding is that this will work fine in normal (RUN) mode.
However, for power savings, I want to disable (power-down) the HSE oscillator, via the oscillator's enable pin, when in STOP mode.
Is there any way to achieve this? I could connect the HSE oscillator's enable pin to an STM32 GPIO and negate the GPIO just before entering STOP mode and then re-assert the GPIO on exit from STOP mode, but there seems to be a chicken-and-egg problem here:
- I'd be stopping the HSE oscillator as the STM32 is entering STOP mode, and thus possibly preventing the STM32 from actually reaching STOP mode
- I'd be unable to restart the HSE oscillator until the STM32 fully exits STOP mode, but if the STM32 needs HSE to be running to exit STOP mode, then the STM32 would never exit STOP mode.
Has anyone used an HSE oscillator in combination with STOP mode and would be willing to share their approach?