2 posts / 0 new
Last post
Cosmin
Offline
Last seen:4 years 11 months ago
加入:2015-12-14 08:35
Sleep activation

Hi Dialog,

I'm using the DA14583 chip with sdk 5 to create a ble aplicataion.

I tried to activate the sleep mode by setting the app_default_sleep_mode to ARCH_EXT_SLEEP_ON in the user_config.h, and then undefining CFG_DEVELOPMENT_DEBUG and defining CFG_MEM_MAP_EXT_SLEEP in the da1458x_config_basic.h.

The thing is, now, when I try to run in debug, I lose control of the chip. I can't even see it advertising with the BlueLoupe app. So I guess it does go to sleep.
But after I flash the chip and connect it to a power source, it doesn't seem to go to sleep anymore. I can see it advertising and I can connect to it and read the data via Bluetooth.

I just want it to sleep and wake up on a button press, but it doesn't seem to stay in sleep mode. Does the chip wake up after a specified amount of time and then sleep again? If so, how can I deactivate this feature?
Can you help me in any way?

Thank you,
Cosmin.

Device:
MT_dialog
Offline
Last seen:2 months 1 day ago
工作人员
加入:2015-06-08 34
你好,因为min,

你好,因为min,

By having set the app_default_sleep_mode to ARCH_EXT_SLEEP_ON in the user_config,h and you try to run the application via keil the program will stop and wait for you to disable the debugger, as soon as you press the stop debugging button you should be able to see the device advertising. What the 583 will do depends on the fw you download, none of the current SDK5 firmwares doesn't set the chip under permanent sleep. All the current examples in the SDK are sleeping between the advertising or between the connection interval events. You can totally disable the sleeping by set theapp_default_sleep_mode in ARCH_SLEEP_OFF, that way you can debug the fw as well. In case you want to set it in permanent sleep and wake up via interrupt please check the smart tag reference design. app_button_press_cb() for the interrupt handling and app_adv_timer_handler() the last else in the function for setting the device in permanent sleep.

Thanks MT_dialog