cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F030F4P6 StandByMode power consumption

rtek
Associate II
Posted on March 28, 2018 at 01:05

Any ideas why this board consumes 3.3 mA in StandByMode even if there's nothing plugged in? I already desoldered the AMS1117 and the on board leds.

Same goes for the STM32F103C8T6 I have. Both using around 3-4mA even is they supposedly are in standbymode. Im pretty sure the MCU enters standbymode since I tested it with a blinking led. Once the MCU entered standby the blinking stopped. When running the code the current draw is around 6mA.

Here's the code im using to put it to standbymode:

__HAL_RCC_USART1_CLK_DISABLE();

__HAL_RCC_GPIOF_CLK_DISABLE();

__HAL_RCC_GPIOA_CLK_

DISABLE

();

__HAL_RCC_GPIOB_CLK_

DISABLE

();

HAL_PWR_EnableWakeUpPin(KeskB_Pin);

HAL_PWR_EnterSTANDBYMode();0690X00000604VqQAI.jpg

Here's the GPIO init: 

I configured all the unused pins as inputs and pulled them low.

void MX_GPIO_Init(void)

{

GPIO_InitTypeDef GPIO_InitStruct;

/* GPIO Ports Clock Enable */

__HAL_RCC_GPIOF_CLK_ENABLE();

__HAL_RCC_GPIOA_CLK_ENABLE();

__HAL_RCC_GPIOB_CLK_ENABLE();

/*Configure GPIO pin Output Level */

HAL_GPIO_WritePin(GPIOA, GPIO_PIN_0|GPIO_PIN_1|LED_Pin|GPIO_PIN_5|GPIO_PIN_9|GPIO_PIN_10,GPIO_PIN_SET);

/*Configure GPIO pin Output Level */

HAL_GPIO_WritePin(GPIOB, GPIO_PIN_1, GPIO_PIN_RESET);

/*Configure GPIO pins : PA0 PA1 PAPin PA5

PA9 PA10 */

GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|LED_Pin|GPIO_PIN_5 |GPIO_PIN_9|GPIO_PIN_10;

GPIO_InitStruct.Mode = GPIO_MODE_INPUT;

GPIO_InitStruct.Pull = GPIO_PULLDOWN;

GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;

HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

/*Configure GPIO pin : PtPin */

GPIO_InitStruct.Pin = KeskB_Pin;

GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING;

GPIO_InitStruct.Pull = GPIO_NOPULL;

HAL_GPIO_Init(KeskB_GPIO_Port, &GPIO_InitStruct);

/*Configure GPIO pin : PtPin */

GPIO_InitStruct.Pin = Read_Pin;

GPIO_InitStruct.Mode = GPIO_MODE_INPUT;

GPIO_InitStruct.Pull = GPIO_NOPULL;

HAL_GPIO_Init(Read_GPIO_Port, &GPIO_InitStruct);

/*Configure GPIO pin : PB1 */

GPIO_InitStruct.Pin = GPIO_PIN_1;

GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;

GPIO_InitStruct.Pull = GPIO_PULLDOWN;

GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;

HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);

/* EXTI interrupt init*/

HAL_NVIC_SetPriority(EXTI4_15_IRQn, 0, 0);

HAL_NVIC_EnableIRQ(EXTI4_15_IRQn);

}

0 REPLIES 0