Skip to main content
Visitor II
November 30, 2015
Question

Pin configuration of SYS_WAKEUp pins when in Standby mode.

  • November 30, 2015
  • 1 reply
  • 657 views
Posted on November 30, 2015 at 13:35

Whats the internal resistance of SYS_WAKEUP pin when in standby mode...?

I dont see any info about it in reference manuals..

 

#stm32-power-mod #standby
    This topic has been closed for replies.

    1 reply

    Technical Moderator
    December 7, 2015
    Posted on December 07, 2015 at 11:29

    Hi freshflash,

    Look to the datasheet of the product you are using (GPIO characteristics) section.

    -Mayla-

    Visitor II
    February 3, 2025

    "I am using the STM32G070CB controller and have configured it to interface with the MCP3561 ADC. However, I have disabled adc and still experiencing higher-than-expected current consumption. Below is my configuration. Can you review it and suggest if there are any issues or improvements to reduce power consumption?"

     

    sprintf((char*) print,"STANDBY MODE is ON\r\n");

    tx_com(print, strlen((char const*) print));

    GPIO_InitTypeDef GPIO_InitStruct = { 0 };

     

    GPIO_InitStruct.Pin = GPIO_PIN_5;

    // GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;

    GPIO_InitStruct.Mode = GPIO_MODE_INPUT;

    // GPIO_InitStruct.Mode =GPIO_MODE_OUTPUT_OD;

    GPIO_InitStruct.Pull = GPIO_NOPULL;

    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;

    HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);

     

    GPIO_InitStruct.Pin = GPIO_PIN_0 ;

    // GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;

    GPIO_InitStruct.Mode = GPIO_MODE_INPUT;

    // GPIO_InitStruct.Mode =GPIO_MODE_OUTPUT_OD;

    GPIO_InitStruct.Pull = GPIO_NOPULL;

    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;

    HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

     

    GPIO_InitStruct.Pin =GPIO_PIN_13;

    // GPIO_InitStruct.Mode =GPIO_MODE_ANALOG;

    GPIO_InitStruct.Mode = GPIO_MODE_INPUT;

    // GPIO_InitStruct.Mode =GPIO_MODE_OUTPUT_OD;

    GPIO_InitStruct.Pull = GPIO_NOPULL;

    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;

    HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);

     

    GPIO_InitStruct.Pin = GPIO_PIN_6 | GPIO_PIN_7 | GPIO_PIN_13;

    GPIO_InitStruct.Mode =GPIO_MODE_ANALOG;

    // GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;

    // GPIO_InitStruct.Mode =GPIO_MODE_OUTPUT_OD;

    GPIO_InitStruct.Pull = GPIO_NOPULL;

    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;

    HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);

     

    GPIO_InitStruct.Pin = GPIO_PIN_15;

    GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;

    // GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;

    // GPIO_InitStruct.Mode =GPIO_MODE_OUTPUT_OD;

    GPIO_InitStruct.Pull = GPIO_NOPULL;

    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;

    HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);

     

    GPIO_InitStruct.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3

    | GPIO_PIN_4 | GPIO_PIN_6 | GPIO_PIN_7 | GPIO_PIN_8

    | GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13

    | GPIO_PIN_14 ;

    GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;

    // GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;

    // GPIO_InitStruct.Mode =GPIO_MODE_OUTPUT_OD;

    GPIO_InitStruct.Pull = GPIO_NOPULL;

    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;

    HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);

     

    GPIO_InitStruct.Pin = GPIO_PIN_8;

    GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;

    // GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;

    // GPIO_InitStruct.Mode =GPIO_MODE_OUTPUT_OD;

    GPIO_InitStruct.Pull = GPIO_NOPULL;

    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;

    HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

     

    GPIO_InitStruct.Pin =GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3

    | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7

    | GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_15;

    GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;

    // GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;

    // GPIO_InitStruct.Mode =GPIO_MODE_OUTPUT_OD;

    GPIO_InitStruct.Pull = GPIO_NOPULL;

    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;

    HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

     

    GPIO_InitStruct.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3;

    GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;

    // GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;

    // GPIO_InitStruct.Mode =GPIO_MODE_OUTPUT_OD;

    GPIO_InitStruct.Pull = GPIO_NOPULL;

    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;

    HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);

    /* Finally enter the standby mode */

    __HAL_PWR_CLEAR_FLAG(PWR_SCR_CWUF);

    get_time();

     

    HAL_Delay(1000);

    if (alarm)

    {

    //to_do_on_alarm();

    alarm = 0;

    // set_alarm();

    }

     

    HAL_PWR_EnterSTANDBYMode();