STANDBY MODE in STM32 || LOW POWER MODES || CubeIDE

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ม.ค. 2025

ความคิดเห็น • 39

  • @tuloca011
    @tuloca011 4 ปีที่แล้ว +2

    Great video as always!

  • @suleakcay4838
    @suleakcay4838 10 หลายเดือนก่อน +1

    I do the wake-up operation with the WakeUp pin on the STM32F7508-DK board, but after it goes to sleep once and wakes up with a trigger, it constantly goes to sleep and wakes up before the trigger comes and continues like a cycle. What can I do about this?

    • @suleakcay4838
      @suleakcay4838 10 หลายเดือนก่อน

      I clear the flags before going into sleep mode, but the problem still persists.

  • @fixwell
    @fixwell 4 ปีที่แล้ว +4

    Hello friend! Thank you so much for your videos! Very helpful in learning! Could you shoot a video of how to make a multi-level menu on the microcontroller, in particular for the OLED display SSD1306 128*64 with SPI interface and the blue pill Board stm32f103c8t6 or for any other STM32 microcontroller. Thanks!

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว +3

      Sure.. I'll work on that soon

    • @fixwell
      @fixwell 4 ปีที่แล้ว

      @@ControllersTech Great news! Thanks!

  • @RaminRezaei-k8m
    @RaminRezaei-k8m ปีที่แล้ว

    Hello .Thanks for your video. Great men have Great mind.

  • @abhishekm1903
    @abhishekm1903 4 ปีที่แล้ว

    Excellent work as always

  • @sevenminuteswiththelord
    @sevenminuteswiththelord 4 ปีที่แล้ว +1

    Hi, I have a problem with the standby mode, namely I would like to make the time appear on the LCD display for 5 seconds, while after 5 seconds the system goes into standby mode for some time, wakes up, shows the time for 5 seconds, falls asleep and so on. However, when the LCD screen wakes up, the time is not displayed, but goes into standby mode immediately.

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว

      And how are u keeping the track of the time ? Are u using some kind of RTC ?
      If you doing so, first test your code without the lcd. Just use some led and see if it is on for 5 sec or not

  • @ElettronicaRiparo
    @ElettronicaRiparo 4 ปีที่แล้ว +3

    Thank you

  • @ibrahimabubakr2227
    @ibrahimabubakr2227 ปีที่แล้ว

    hello sir,
    I did get an STM32f401 , and the standby works fine but there is something,
    if (__HAL_PWR_GET_FLAG(PWR_FLAG_SB) == SET)
    I use this if statement to check if the wakeup reason is the RTC or the Reset as you mentioned in your blog, this If condition has an else that the board doesn't execute. when I press the Reset button it goes to the If statement. in short, I couldn't distinguish between the RTC wake-up and the reset button. I hope you get my question and help me with it

  • @johnfrancis923
    @johnfrancis923 10 หลายเดือนก่อน

    Hi
    I want to enable the wake-up function for RTC, but I didn't see a wake-up option in RTC of the STM32C011F6U6 controller in the cube IDE. I need to implement a 5-second delay while reading the temperature via SPI in standby mode to save power. Is this a limitation of my controller, or do I need to change some other settings to enable wake-up in RTC?

  • @johnfrancis923
    @johnfrancis923 10 หลายเดือนก่อน

    I am periodically waking the controller every 5 seconds to read the temperature from the MAX31855 slave device and transmit it to the computer console using UART. While sleep and stop modes work fine with my STM32 L053R8 controller, enabling shutdown mode results in incorrect temperature readings. Is this due to the short delay of 5 seconds, or is shutdown mode not suitable for my application? Please help.

  • @nguyenhuyhoang2693
    @nguyenhuyhoang2693 ปีที่แล้ว

    Thanks your help. Respect!

  • @ucontrolchannel5967
    @ucontrolchannel5967 4 ปีที่แล้ว +1

    great job tahnk you. Could you also share a video about USB mass storage??

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว

      Not possible right now..

    • @ucontrolchannel5967
      @ucontrolchannel5967 4 ปีที่แล้ว

      @@ControllersTech 🥺🥺🥺

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว

      I don't have the module, and can't buy it too.

    • @ucontrolchannel5967
      @ucontrolchannel5967 4 ปีที่แล้ว

      @@ControllersTech Thanks a lot bro, you are doing very good job, I like your videos so much, pls continue.

  • @zekoli1243
    @zekoli1243 2 ปีที่แล้ว

    Hi. I boot with stm32L010C6Tx. I am in standby mode. While waiting in standby mode, it shows between 3.1 micro amps and 50 micro amps 50 microamps is too high, I can't use it like this. . I turned off all peripherals. What else should I turn off?
    void SystemClock_Config(void);
    static void MX_GPIO_Init(void);
    static void MX_LPUART1_UART_Init(void);
    static void MX_I2C1_Init(void);
    static void MX_ADC_Init(void);
    static void MX_RTC_Init(void);
    if (__HAL_PWR_GET_FLAG(PWR_FLAG_SB) != RESET) {
    __HAL_PWR_CLEAR_FLAG(PWR_FLAG_SB);
    printf("Wakeup from the STANDBY MODE

    ");
    for (int i = 0; i < 20; i++) {
    HAL_GPIO_TogglePin(GPIOC, GPIO_PIN_13);
    HAL_Delay(200);
    }
    HAL_PWR_DisableWakeUpPin(PWR_WAKEUP_PIN1);
    HAL_RTCEx_DeactivateWakeUpTimer(&hrtc);
    }
    __HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);
    __HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(&hrtc, RTC_FLAG_WUTF);
    printf("About to enter the STANDBY MODE

    ");
    for (int i = 0; i < 5; i++) {
    HAL_GPIO_TogglePin(GPIOC, GPIO_PIN_13);
    HAL_Delay(750);
    }
    HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN1);
    if (HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 0x5A55, RTC_WAKEUPCLOCK_RTCCLK_DIV16)
    != HAL_OK) {
    Error_Handler();
    }
    printf("STANDBY MODE is ON

    ");

    HAL_GPIO_DeInit(GPIOC, GPIO_PIN_13);
    HAL_GPIO_DeInit(GPIOA, SDIO_Pin);
    HAL_GPIO_DeInit(GPIOA,GPO3_Pin);
    HAL_GPIO_DeInit(GPIOA,BUZZER_Pin);
    HAL_GPIO_DeInit(GPIOA, GPIO_PIN_0);
    HAL_GPIO_DeInit(GPIOA, CSB_Pin);
    HAL_GPIO_DeInit(GPIOA,FCSB_Pin);
    HAL_GPIO_DeInit(GPIOA,SCLK_Pin);
    HAL_UART_DeInit(&hlpuart1);
    HAL_I2C_DeInit(&hi2c1);
    HAL_ADC_DeInit(&hadc);

    HAL_PWR_EnterSTANDBYMode();

  • @ibrahimabubakr2227
    @ibrahimabubakr2227 ปีที่แล้ว

    Hi
    I cant fined these options in stm32cubemx with stm32f103c8t6 (I mean the alarm and wakeup section) is it supported in stm32f103 ?

    • @ControllersTech
      @ControllersTech  ปีที่แล้ว

      I see the options are available at the register level but not in cubeMX. You can check the reference manual about how to turn the alarm on.

  • @Zerk0ful
    @Zerk0ful 3 ปีที่แล้ว

    Could I place this whole standby code part to while(1)? I would like to periodically read sensor values when MCU awakes.

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว +1

      What's the point of putting inside the while loop ?
      When the mcu wakes up from the standby, the code executes from the beginning i.e. HAL_Init () function..
      So you just keep it in the main function like i did, and it will work fine

  • @jacobdavis000
    @jacobdavis000 3 ปีที่แล้ว

    Great tutorial. Music is pleasant but was a distraction. BTW: chords? eMaj, bMaj, f#Min, aMaj, bMaj (back to eMaj)....I think.

  • @utkudenizaltiok860
    @utkudenizaltiok860 2 ปีที่แล้ว

    I want to be in lowest power mode but I want to see the values of variables at Live Expressions eve I entered that power mode as well what should I use ?

    • @ControllersTech
      @ControllersTech  2 ปีที่แล้ว

      you can't.. that's not how the low power modes work

  • @lizethgallegosmartinez4958
    @lizethgallegosmartinez4958 2 ปีที่แล้ว

    Hi! Using this example is possible to standby minutes or hours?? Because I tried to change the time of the standby and it only works from 1-30 seconds

  • @uawhisper
    @uawhisper 4 ปีที่แล้ว

    Hello. I am using stm32f103c8t6 aka bluepill. But the lowest consumption I get is 1mA. Ive removed the power regulator and the LEDs. Measuring the current witch INA3221 and the regular multimeter. Could someone please help me...?

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว

      Are you sure that the device is entering the standby mode ?

    • @uawhisper
      @uawhisper 4 ปีที่แล้ว

      ​@@ControllersTech i am running the folowing commands:
      //enable the PWR control clock
      RCC->APB1ENR |= RCC_APB1ENR_PWREN;
      //setSLEEPDEEP bit of Cortex System Control Register
      SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
      //select standby mode
      PWR->CR |= PWR_CR_PDDS;
      //clear wake up flag
      PWR->CR |= PWR_CR_CWUF;
      //enable wake up pin
      PWR->CSR |= PWR_CSR_EWUP;
      __DSB(); /* Ensure effect of last store takes effect */
      //request wait for interrupt
      __WFI();

    • @uawhisper
      @uawhisper 4 ปีที่แล้ว

      Controllers Tech I am quite sure, because when I apply pos-edge pulse on PA0, it wakes up.

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว

      Can u simply use the function to go into the standby mode.. like i have used in the video. And than try measuring current

    • @uawhisper
      @uawhisper 4 ปีที่แล้ว

      @@ControllersTech i am using the next code:
      __HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);
      HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN1);
      HAL_PWR_EnterSTANDBYMode();
      I have two bluepills and with this code, one gives me 0.8mA and another, 0.02mA. The difference between both is that the first one has an on board power regulator and LEDs removed. The other one has exactly 0 coponents on board (just the uC and reset button). I am trying to achieve 0.002mA (2uA) because I am working on battery powered IoT device.

  • @phamthanhlong6637
    @phamthanhlong6637 4 ปีที่แล้ว

    I'm new to stm32, do you have lots of tutorial videos from the beginning about it?

  • @muhammadbasir83
    @muhammadbasir83 4 ปีที่แล้ว

    at first, i thought i was watching "How it's Made" channel.