How to keep GPIO state after wakeup from Extended Sleep mode

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
nigelyang
Offline
Last seen:1 week 2 days ago
加入:2018-03-20 08:24
How to keep GPIO state after wakeup from Extended Sleep mode

I found that if my GPIO state is low, it will loss the state(become high) after wake up from Extended Sleep mode. The datasheet indicates that peripheral power domain (PER_PD)is optionally on/off in Extended Sleep mode. How to keep the GPIO state Low even if go to Extended Sleep mode (that is Extended Sleep mode with PER_PD)??

thanks

Device:
PM_Dialog
Offline
Last seen:3 days 4 hours ago
工作人员
加入:2018-02-08 11:03
Hi nigelyang,

Hi nigelyang,

According to the DA1468x datasheet, the default GPIO value is pull-down and not pull-up. When the device goes into sleep, the system loses all the default configurations. You should put all your configurations into the periph_init() in case you want to wake-up and have the configuration you had before the extended sleep. So, all the pins configuration should be added into the periph_init(), that should be executed by the prvSetupHardware(). With this way, when you wake up, the power manager will reconfigure the pins with the previous state.

Thanks, PM_Dialog

nigelyang
Offline
Last seen:1 week 2 days ago
加入:2018-03-20 08:24
Simply, my application (with

Simply, my application (with extended_sleep mode) tries to do the button pressing in a one task causes a GPIO pin low until a long timer's timeout. But I do not know how to keep the GPIO low between tasks switching, it seems loss GPIO high/ low state if go to sleep mode. Is there any way to do my application except using "active mode"?

PM_Dialog
Offline
Last seen:3 days 4 hours ago
工作人员
加入:2018-02-08 11:03
Hi nigelyang,

Hi nigelyang,

Could you please clarify which hardware you are using? Are you using the 680 Development-Kit or any other board? In case of 680 Development-Kit, are using the K1 push button which is connected with P1_6? Otherwise, which GPIO are you trying to configure? Please, upload the code snippet of the button configuration. It would be very helpful to to try to replicate your issue.

Thanks, PM_Dialog