Author Topic: STM32F446: External Oscillator vs. STOP mode?  (Read 772 times)

0 Members and 1 Guest are viewing this topic.

Offline Jay1011Topic starter

  • Contributor
  • Posts: 32
  • Country: us
STM32F446: External Oscillator vs. STOP mode?
« on: July 20, 2020, 06:32:11 pm »
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?
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11259
  • Country: us
    • Personal site
Re: STM32F446: External Oscillator vs. STOP mode?
« Reply #1 on: July 20, 2020, 08:31:49 pm »
A typical approach for this is to switch the system to the internal RC before the sleep and switch back after wake up.
Alex
 
The following users thanked this post: thm_w


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf