不能进入睡眠模式

4 posts / 0 new
Last post
ankitdaf
Offline
Last seen:2 years 9 months ago
加入:2015-09-03 20:14
不能进入睡眠模式

Hi

I am using the ble_app_barebone example. I read the UM-006 on sleep mode thoroughly.

The application does not seem to enter sleep mode at all.

The main loop inside arch_main is the same as in the ble_app_barebone.

I tried to add
if ((sleep_mode == mode_ext_sleep) || (sleep_mode == mode_deep_sleep)) {
ble_turn_radio_off();
arch_goto_sleep(sleep_mode);
}

but that did nothing.

I have defined

#define CFG_EXT_SLEEP // For extended sleep mode
#undef CFG_DEEP_SLEEP

in da1458x_config_basic to enable extended sleep.

CFG_MAX_SLEEP_DURATION_PERIODIC_WAKEUP_MS is defined to 500 (0.5s). Am I correct in understanding that this is the wakeup duration ?

Please help me figure out what I am missing ? The 580 seems to never enter sleep mode.

Device:
MT_dialog
Offline
Last seen:2 months 2 weeks ago
Staff
加入:2015-06-08 11:34
Hi ankitdaf,

Hi ankitdaf,

You are using Smart Snippets in order to check that the 580 never sleeps? In the barebone example in order to set it in extended sleep all you have to do is to go to the user_config.h file and change the app_default_sleep_mode to ARCH_EXT_SLEEP_ON, you dont have to alter the code anywhere else.

Also theCFG_MAX_SLEEP_DURATION_PERIODIC_WAKEUP_MSis a default value that defines when the 580 will wake up periodically when there's no pending BLE operation. You dont have to change that in anyway.

Thanks MT_dialog

ankitdaf
Offline
Last seen:2 years 9 months ago
加入:2015-09-03 20:14
I tried to set app_default

I tried to set app_default_sleep_mode to ARCH_EXT_SLEEP_ON, but the application just stops advertising, and does nothing else. This is not the expected behaviour. Can you point me to where to look ?

MT_dialog
Offline
Last seen:2 months 2 weeks ago
Staff
加入:2015-06-08 11:34
Hi ankitdaf,

Hi ankitdaf,

If you use the app_ble_barebone as is and set the app_default_sleep_mode intoARCH_EXT_SLEEP_ON, is the device advertising ? Also you cant sleep and debug, when the sleep is enabled you have to exit debug mode, if not the device will stop advertising until you disable the debbuger. Additionally if you are operating on a custom pcb and you dont have an XTAL32 for the low power clock your device will sleep and never wakeup, you will have to change the low power clock to the RCX option in the da1458x_config_advnaced.h file at theCFG_LP_CLK #define.

Thanks MT_dialog

Topic locked