Learn MoreFAQsTutorials

5个帖子/ 0新
Last post
thanhtu131.
Offline
最后一次露面:1 week 2 days ago
Joined:2018-09-18 17:44
SleepMode示例问题

嗨!我正在基于BLE SleepMode示例为DA14580开发应用程序。我一天读了主循环,并试图清楚地了解它

我将一些日志放入主循环代码并获取结果(显示在附加文件中)。我有2个问题:

1/ In the first 10 seconds, when the function arch_goto_sleep() is called, does the system go to sleep? or just the sleep mode is set?

2 /系统转到睡眠后,WFI()称为等待中断恢复操作,中断在前10个躯干中唤醒系统?我没有用一个按钮连接到基本套件或连接到任何设备。但在结果文件中,我的日志在前10个ordononds中持续了

期待您的亲切回复!谢谢

Attachment:
Device:
PM_DIALOG.
Offline
最后一次露面:11 hours 23 min ago
Staff
Joined:2018-02-08 11:03
Hi Thanhtu131,

Hi Thanhtu131,

谢谢for your question. Could you please clarify what you are trying to accomplish? The main_func() is an SDK function and we strongly recommend nor modifying any SDK function or file. The SDK should be used as it is and all the implementation should be done in the application lever which contains all the file starting with “ user_ “ .

Adding printing information in the main function will delay the system.

In order to put the system in sleep mode, you should use the appropriate APIs from the arch_sleep.c source file.

Additionally, the sleep mode can be set by configuring the app_default_sleep_mode variable in user_config.h file. The main loop consists of two parts. The first part is executed while the CPU is active and for as long as the kernel or the application wants the CPU to remain active. In the second part of the main loop the program attempts to go into power down mode. It will try to shut down the BLE hardware and then the rest of the peripherals and set the CPU in a low power state while waiting for interrupt (WFI), either from some external pin or a BLE programmed event.

Please see Figure 9: The Main Loop from theUM-B-051 : DA14580 Software Platform Reference (SDK5)用户手册以获取更多信息。

关于可用的睡眠模式,我建议首先阅读Tutorial 4 : configuring sleep mode on DA1458xtutorial.

If you are starting a new design / project, we would strongly recommend to start with DA14531 or DA14585/586 products and our latest SDK6.0.14, as it is much more improved. We have a lot of code examples and improved documentation, and there is also software roadmap support. There is no software roadmap support for DA14580 product family and SDK5.

请查看DA14531:

//www.wsdof.com/products/connectivity/bluetooth-low-energy/products/da14531

We also have a DA14531 module, namely DA14531 SmartBond TINY™ Module! It has very small dimensions and is very low power. Follow the link below to find datasheet, documentation and HW collaterals for the module:

//www.wsdof.com/products/bluetooth-module-da14531-smartbond-tiny

There also reference designs that you will help you to reduce the developing stage, as you don’t need to spend so much time in developing your application code.

无代表

The CodeLess allows you to quickly get started with wireless IoT applications with a set of AT Commands. The CodeLess AT commands platform allows control over a local UART connected device as well as a remote device via BLE. You can create simple demos / applications / proof of concepts without any code development or build you own application on top!

//www.wsdof.com/products/smartbond-codeless-commands

Dialog Serial Port Service (DSPS)

The DSPS emulates a serial cable communication. It provides a simple substitute for RS-232 connections, including the familiar software flow control logic via Bluetooth low energy. The SPS software distribution includes the application and profile source codes and supports GAP Central/Peripheral roles.

//www.wsdof.com/products/dialog-serial-port-service-dsps

谢谢,PM_DIALOG.

thanhtu131.
Offline
最后一次露面:1 week 2 days ago
Joined:2018-09-18 17:44
我已经阅读了UM-B-051:

I had readUM-B-051 : DA14580 Software Platform Reference (SDK5)andTutorial 4 : configuring sleep mode on DA1458xfor many times.

i can see that adding printing information in the main function will delay the system.

But I really want to undestand 3 things:

1 /在第一次10秒,如果我不修改code, does the system go to sleep? Or the main loop just tries to sleep based on the sleep mode which is set before by the function arch_set_deep_sleep() (or arch_set_extended_sleep()) ?

2/ In the first 10sec, if the there is no code modification or connection, does the main loop sleep successfully? and which line in the code do it? If the main loop make the system sleep successfully? What line of code that wake the system so the system can advertise? Is it the BLE timer?

3/ After 10sec advertising, the callback function user_app_adv_undirect_complete() is call and then the function arch_ble_ext_wakeup_on() is called to ensure that only an external (GPIO) wakup event can wake up the system. Am i right?

i looking forward to recieving your replies soon? Sorry for to many questions i had made!!

PM_DIALOG.
Offline
最后一次露面:11 hours 23 min ago
Staff
Joined:2018-02-08 11:03
Hi Thanhtu131,

Hi Thanhtu131,

I have replied you in the following forum thread:

https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/sleepmode-example

谢谢,PM_DIALOG.

thanhtu131.
Offline
最后一次露面:1 week 2 days ago
Joined:2018-09-18 17:44
Thank you very much!!

Thank you very much!!