STM8L low-power mode

STM8L low-power mode


       A major feature is the low power STM8L family to STM8L051F3 for example, the model MCU has five low-power modes, respectively Wait, Low power run, Low power wait, Active-halt with RTC, Halt and so on. Halt mode where the power consumption is the lowest herein, this will also be discussed in detail in this mode.
       Under the five low-power modes, each with a different peripherals to close and open, increasing the low-power mode of the peripheral open means more power, functionality and power requirements can be a reasonable choice according to their own projects under different low-power mode, the interrupt is not the same wake-up mechanism, as shown below.
         Figure I
         Figure II
       More than two figures can be obtained from the specifications book STM8L query. May enter the corresponding low power mode according to their needs. HALT wake of which the lowest power, this mode all peripherals off, you can break through the port, I2C interrupt, SPI interrupt other ways.
Note:
       1, in this mode through the serial port can not wake up, meaning if entering HALT, unless it is first interrupted by a port or other valid interrupt wake MCU, in order to use the serial port functions, such as using the first port interrupt wake MCU, contains the serial port interrupt function communication.
       2, if you want to wake up and addresses through I2C I2C communication needs continuously transmitted twice STM8L host, the host transmits the first address matches the address register STM8L I2C wake STM8L, into the I2C interrupt, the host sends the second address makes the I2C STM8L address register match to enter the corresponding I2C communications sent or received. STM8L wake-up time is 5us, so in theory the host address to send two intervals should be 5us.
            Here Insert Picture Description
       3, before the HALT mode should peripherals to manually shut down, did not use the low pin set to push-pull outputs, which makes a substantial decline in consumption, I had used STM8L051F3 made a module, the power consumption in low power mode about 2uA. (I do not know whether the pins better approach, have tried to enter, the measured power consumption is high)
       4, before entering the HALT mode, the interrupt should always open. It might not wake up.
       5, end interrupt need to be closed before returning to low-power mode peripherals useless, useless configuration pins, clear the interrupt flag to open a total interruption.
       6, HALT () function needs to be placed in while () loop, or it may enter and exit the wake MUC interrupt can not re-enter low-power mode.

 while (1)
  {
     halt(); 
  }

      7, can not add halt () function interrupt, otherwise it will cause the system to crash.

      I Caishuxueqian, correct me if wrong welcomed the bigwigs!

Released two original article · won praise 12 · views 2456

Guess you like

Origin blog.csdn.net/weixin_43278295/article/details/103537551