Giter Club home page Giter Club logo

Comments (2)

hallard avatar hallard commented on July 3, 2024 1

In the meanwhile, I found the reason

On init, clock is setup to 4MHz see STM32Cube_FW/system_stm32wlxx.c

and After deepsleep, ForceOscOutofDeepSleep() is called and on this one, the clock is set back to 48MHz with RCC_MSIRANGE_11

RCC_OscInitStruct.MSIClockRange = RCC_MSIRANGE_11;

So I don't think it's a bug or whatsoever, but worth mentioning because running at 4MHz can have some side effect see #15463

I tried to slow down frequency (8Mhz, 16MHz, 24MHz, ...) to lower consumption in ForceOscOutofDeepSleep() but in this case for example, I2C Secure Element is unable to wake (ATECC608a) from sleep in mbed-cryptoauthlib, only way is to set to 48MHz

So quick and dirty fix is going to deepsleep at startup.

int main()
{
  // Go go speed cruise, Don't go below 8ms 
  // because it could stay at 4MHz (time to setup ?)
  ThisThread::sleep_for(10ms);
 ....
}

from mbed-os.

0xc0170 avatar 0xc0170 commented on July 3, 2024

cc @ARMmbed/team-st-mcd

from mbed-os.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.