Skip to main content
Visitor II
November 5, 2020
Question

How to enter low power mode in stm8l051

  • November 5, 2020
  • 1 reply
  • 819 views

Hello

I am new to the world of micro controllers and stm8 in general and I wanted to know how to enable halt mode (A sample code would be nice)

    This topic has been closed for replies.

    1 reply

    Visitor II
    December 3, 2020
    PWR_FastWakeUpCmd(ENABLE);
     
    GPIO_Init(GPIOA, GPIO_Pin_All, GPIO_Mode_Out_PP_Low_Slow);
    GPIO_Init(GPIOB, GPIO_Pin_All, GPIO_Mode_Out_PP_Low_Slow);
    GPIO_Init(GPIOC, GPIO_Pin_All, GPIO_Mode_Out_PP_Low_Slow);
    GPIO_Init(GPIOD, GPIO_Pin_All, GPIO_Mode_Out_PP_Low_Slow);
     
    PWR_UltraLowPowerCmd(ENABLE);
    halt();