2025-03-14 7:14 AM - edited 2025-03-15 4:06 PM
I am using this MCU on a battery-supplied custom board: STM32G0B1RET.
I am looking for clarification re. the GPIO availability in Standby Mode.
Table 26 in Reference Manual RM0444 (see below) seems to offer one of two (exclusive) possibilities:
Please confirm. Thank you!
2025-03-14 7:30 AM - edited 2025-03-14 7:32 AM
Third option:
All GPIOs can be configured with internal pull-up, pull-down or floating. Out of those pins, 5 (6?) of them have an additional wakeup capability which can be used in addition to the pullups.
2025-03-15 12:45 PM
Thank you, @TDK.
The solution that you suggested sounds exactly what I am looking for. I attempted to implement that, please see the below code snippet. However, the result is not what I expected.
I expected that the GPIO pin PC4 is LOW (pull-down) after entering the low-power Standby Mode. However, entering Standby Mode does the opposite, it pulls the output up to HI.
Please advise what is wrong with my code, or what is missing. Thank you!
PWR->CR3 |= (0xFFFF & PWR_CR3_APC); // Set APC bit 10
PWR->PDCRC |= (0xFFFF & PWR_PDCRC_PD4); // Set pull-down bit PD4 for pin PC4
/* Wakeup source: enable the WakeUp6 Pin PB5 with PWR_WAKEUP_PIN6_LOW, i.e.
* with a falling edge */
HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN6_LOW);
/* Clear all related wakeup flags*/
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WUF6);
/* Enter the Standby mode */
HAL_PWR_EnterSTANDBYMode();
2025-03-15 2:20 PM
Pull is weak check pdf, typic around >15k. In standby only RTC pins can drive low.
2025-03-15 2:48 PM - edited 2025-03-15 2:52 PM
What is your chip part number?
2025-03-15 4:04 PM
Thank you, @TDK. I am using this MCU on a battery-supplied custom board:
STM32G0B1RET.
2025-03-15 4:09 PM - edited 2025-03-15 4:11 PM
Thank you, @MM..1!
Sorry, I am not familiar with the acronym 'pdf'. Is it ?pull-down frequency'? And it should be > 15 kHz?
If Standby Mode is not suitable, is the low-power Shutdown Mode an option, or another mode?
Thanks!