Dear Dialog_Support Team,
I am configuring extended sleep mode in my custom application. I have followed ble_app_sleepmode example to configure extended sleep mode. And my device is able to go into sleep mode and if i press push button, it is able to wake up from sleep. Right now i have written program like if i pressed push button then device must be awake and LED will turn on. But led remain ON for a while only. Means as i released the push button led becomes OFF. What could be the reason? Why LED is not able to retain its state? This same happening while i am turning LED ON from ble scanner App.
With Regards,
Ruchi Patel
Keywords:
Device:
Hi Ruchi Patel,
设备保留销的状态的时候goes in sleep mode, so while you are in sleep mode the led should remain ON, but when waking up the device will run the periph_init() function and when that part of the code executes it will also reconfigure the pins in their default state. So in order to have the LED on at all times you will have to "remember" the state of the pin when waking up, and when the periph_init() function executes you will have to re-apply the value of the pin while it was sleeping.
Thanks MT_dialog