cancel
Showing results for 
Search instead for 
Did you mean: 

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? Why coul

ZKURT.1
Senior

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\n\n");

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\n\n");

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\n\n");

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();

2 REPLIES 2
Simon.T
ST Employee

Hello @ZAHİDE ZEYNEP KURT​,

Your code seems good. Do you measure only the chip or you whole circuit ? And what amperemeter do you use ?

Regards,

Simon

Ps: Please next time write your question on the text part and not in the title

Hi. I found the reason. i have rf in my circuit and i noticed it is not working. There is probably a short circuit somewhere. There was no such problem in the running circuit.