sleep mode, wake up and key board scan

⚠️
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.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
2 posts / 0 new
Last post
guxiang
Offline
Last seen:4 hours 12 min ago
加入:2017-05-12 04:18
sleep mode, wake up and key board scan

hi, dialog
We use "kbscn_demo" project to do the experiment on DA14681 basic develop board. And were confused by some experiment phenomenons:
1. "pm_set_sleep_mode(pm_mode_extended_sleep);" was used in this project. But it seems that there is a delay for the device going to sleep mode and can see the board white LED "D1" were on last for about sevral second after system reset.
2. After the device enter sleep mode(white LED "D1" was off) , white LED "D1" will on for a very short time at about every 8 seconds .
3. Usually , any matrix key press will wake up the system from pm_mode_extended_sleep. But if we masked some wakeup timer initialization,key press triggering wake-up would be ineffective;
// hw_wkup_init(NULL);
// hw_wkup_set_counter_threshold(1);
// hw_wkup_set_debounce_time(1);
// hw_wkup_register_interrupt(wkup_intr, 1);
4. Except timer1 and wake-up timer , is there no any other way to wake up the system from sleep mode?

Device:
MT_dialog
Offline
Last seen:2 months 4 days ago
工作人员
加入:2015-06-08 11:34
Hi guxiang,

Hi guxiang,

1) The 68x SDK spends the first 8 seconds after reset in no sleep mode regardless the default sleep mode set by the SDK, in order for the XTAL32 to settle, after that the device goes in the sleep mode that the SDK dicates as a default, if that is what you are seeing.

2) After the device enters sleep mode apparently it sleeps and the LED goes off, the LED D1 swicthes on when the device wakes up, the minimum time that the device can spend in continues sleep mode is 8 seconds (due to Timer1 wicth), so every 8 seconds he devices wakes up and thats why you see the D1 LED turns on. Since there is no action for the device to do, the device goes back to sleep, therefore the LED turns off.

3) The functions that you have masked out are configuring the wakeup timer of the device, if this remains unconfigured then the device wont be able to wake up from sleep. Only the wakeup timer can wake up the device from an external event while the device is in sleep mode.

4) When in sleep mode the 68x can wake up from either Syncronously from Timer1 or BLE Timer, or Asynchronously from the Wake up timer or the VBUS interrupt.

In the project, there is a readme.md file, that explains the functionallity of the demo, please check that as well.

Thanks MT_dialog