GPIOs configurations in low-power Standby Mode: STM32G0B1RET
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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:
- Without wakeup capability: wakeup pins are not available, but I/Os can be configured with internal pull-up, pull-down or floating. That would mean a GPIO pin can be assign 0 in Standby Mode.
- With wakeup capability: wakeup pins are available, but GPIOs cannot be configured and are floating.
Please confirm. Thank you!
- Labels:
-
STM32G0 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-15 2:20 PM
Pull is weak check pdf, typic around >15k. In standby only RTC pins can drive low.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-15 2:48 PM - edited ‎2025-03-15 2:52 PM
What is your chip part number?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-15 4:04 PM
Thank you, @TDK. I am using this MCU on a battery-supplied custom board:
STM32G0B1RET.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-16 12:54 AM
and FYI PDF - Wikipedia
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-16 11:14 AM
Hello @MM..1, many thanks for sending your response on a Sunday morning!
I now see that you meant *that* PDF :) Sorry for the misunderstanding, I did not see the attachment. I'll study the info and also AN4899 'STM32 microcontroller GPIO hardware settings and low-power consumption'.
Have a good rest of your weekend.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-16 11:34 AM
@MM..1you say that "In standby only RTC pins can drive low." Can you please point me to that in a ST doc?
Thanks again.
