cancel
Showing results for 
Search instead for 
Did you mean: 

How to enter low power mode in stm8l051

KKusi.1
Associate II

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)

1 REPLY 1
WRost.1
Associate II
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();