I am working on the PAN1740 with the Dialog-Evalkit-Pro on SDK 5.0.3
Currently I am trying to run my setup in extended sleep mode.
CFG_MAX_SLEEP_DURATION_PERIODIC_WAKEUP_MS 500
app_default_sleep_mode = ARCH_EXT_SLEEP_ON
But the Board wakeups immediatly after going to sleep. The time in sleep is only 80us.
Is there more to do to set the board in extended sleep mode?
Device:
Hi Ralf S,
在启动时,设备将根据您在User_Config.h文件中设置的设置配置为您在User_Config.h文件中设置的设置,该设置将要设置已在User_ProfileS_Config.h中配置的服务的数据库(如果您设置了任何服务)。设备完成后,您的设备中启用了一个配置文件,呼叫Default_App_On_Set_dev_config_complete()(对于设备配置)和default_app_on_db_init_complete()将被调用(用于数据库配置)。在大多数示例中,有配置文件所以在设备的配置后(default_app_on_set_dev_config_complete)将发生数据库完成回调(default_app_on_db_init_complete)。default_app_on_db_init_complete()中的BLE示例将强制设备进行通告。因此,您不会能够下载和免疫推卸地睡眠,您必须让您的设备自行配置,然后从这两个回调中可以设置唤醒状态(外部唤醒或将唤醒您的设备的计时器)和之后该设备将落入永久性睡眠状态。
Additionally when the device is in sleep mode and advertising or it is connected that means that it sleeps between the advertising or the connection intervals. If you would like to set the device into permanent sleep follow the above procedure. The CFG_MAX_SLEEP_DURATION_PERIODIC_WAKEUP_MS is a definition that configures how often the device will wake up when there is no BLE activity at all.
最后,当设备启动时,它会花费大约2秒,休眠禁用,以便XTAL32正确解决。
Thanks MT_dialog
Thank you for the reply!
我现在将我的设备配置为广告,间隔为10s。我获得了660UA的当前,但如果该设备延长睡眠,则应下降到1,4ua。所以我假设它不睡眠。如果我将其设置为“Arch_sleep_off”,则当前消耗没有差异。
所以我必须显式设置一个时间r or external wakeup in my main function if want the device to enter the sleep mode?
嗨Ralf S.
By setting the app_default_sleep_mode=ARCH_EXT_SLEEP_ON is enough to put the device in extended sleep, if you have set the device to be advertising with an intreval of 10 seconds then you should get (when the device is not advertising) about 1.4uA. You dont have to set anything extra, if you have passed to the kernel an advertising command with an advertising interval of 10 seconds the device should advertise, sleep and wake up on its own when its time to advertise, with 10 seconds interval. Try to download the code via UART using Smart Snippets and check via the power profiler if the device is sleeping or not (if you have a pro dev kit) or you can try to measure the power the consumption within that 10 second interval.
Thanks MT_dialog
I have a Pro Dev Kit and I am measuring the current on J11 with an external DMM.
When I scan for the device with the DSPS app, I can find the device only every 10s. Therefore I can assume the advertise interval is set correctly.
I just tested with the power profiler.The attached plotshows the advertisement period. After the advertisement the device settles, but is not going to sleep. The waveforms which start at 5ms have a period of 1ms. The advertisement starts every 10s, just as configured.
I have code running in the callback function app_on_sytem_powered, and return it with "GOTO_SLEEP".
Hi Ralf S,
Try the below suggestions with the DSPS source code as is, except the 10 seconds advertising interval in order to have the chance to measure the low power mode.
1) I suppose that you download the fw via JTAG and you hit the run button from keil. While the debugger is attached on the device you wont see the device going to low power mode. So just press the Start/Stop debug button and then press it again. That way the debugger will detach and the device will be able to go to low power mode.
2) There are cases where the debugger module stays on even if the debugger is detached, that causes the 580 not to be able to go to sleep mode, so in order to eliminate that case you can download code via the UART interface and the Smart Snippets tool. Take the produced binary and use the uart_booter from Smart Snippets in order to download the fw.
Thanks MT_dialog
Hi,
now I have it working. At least the example. You were right, I downloaded via JTAG. When I use the the UART interface in Smart Snippets i get the sleep current in the range of 2uA and in the power profiler the wakeup from sleep and the peaks to about 5mA when advertising can be seen.
所以调试器仍然附着,设备不会睡眠。我看到的额外电流是仍然激活的调试器,或者设备实际上没有睡觉吗?
嗨Ralf S.
As far as i am aware the device is sleeping, the peripherals are powered down and the ARM is in WFI but the debugger module stays on and consumes that extra current. You can try to follow the below FAQ in order to be able to download the fw via JTAG and when stop debugging to see your device entering sleep.
https://support.dialog-semicondiondiond.com/guide/faq-known-issues.
Thanks MT_dialog