DA14583的睡眠配置

Learn More常见问题解答教程

9个帖子/ 0新
最后一篇
Utkarash
离线
Last seen:6 months 2 weeks ago
加入:2019-01-18 06:36.
DA14583的睡眠配置

Hello All,

I am using Dialog's DA14583 based Dev Kit with a I2C based capacitive proximity sensor with touch key.

我的主要应用是感测接近变化(即,触摸检测到),并根据更新广告数据包的数据字节来进行以下几个数据字节,该广告数据包由另一个设备收集。

该传感器具有以下优惠
- 它具有额外的数据中断引脚,除了传感器侧的基本I2C通信引脚,理想地保持高。
-The sensor pulls the Data interrupt pin LOW whenever the data is ready and is about to send it over the respective I2C pin to the MCU.

我已将传感器的数据中断引脚连接到我的MCU GPIO引脚,该引脚被配置为每当该引脚变为低电平时都会给出中断。

I have programmed the sensor in such a way that whenever there a proxomity change (i.e., Touch detected) the sensor will pull the Data interrupt pin LOW and then MCU can initiate the Read operation. Also i have programmed the sensor in low power mode so that it consumes less power.

在我的应用程序数据中断引脚,人体运动检测将中断MCU并基于读取传感器值,我将在广告数据包中更新数据。

This Logic works properly in Active Mode, However my device would be battery operated i want to implement Extended Sleep Mode in this device.

对于睡眠模式,我已经引用了“BLE_APP_SLEEP_MODE”和“PROXY_REPORTER”示例代码,并在代码中进行了相应的更改
- 在user_config.h文件中

app_default_sleep_mode = arch_ext_sleep_on.

- 唤醒

ARCH_DISABLE_SLEEP();if(getBits16(sys_stat_reg,per_is_down)){periph_init();}如果(arch_ble_ext_wakeup_get()){ARCH_SET_SLEEP_MODE(APP_DEFAULL_SLEEP_MODE);ARCH_BLE_FORCE_WAKEUP();ARCH_BLE_EXT_WAKEUP_OFF();app_easy_wakeup();}

-For activating Sleep

ARCH_SET_SLEEP_MODE(ARCH_EXT_SLEEP_ON);

For Longer battery life i have changed application as follows,
-First i do the respective sensor configuration and MCU configurations and after that i send the MCU in sleep mode.
- 使用数据中断引脚I唤醒设备,然后检查传感器数据并执行更新广告分组的相应操作。
- 在此之后,我再次在睡眠模式下发送设备等待下一个中断。

Now when i incorparate sleep mode i am not able to get proper response from device, whole logic fails, where i am not able to get proper interuupts or proper data
因此,我还尝试了唤醒逻辑的以下更改

ARCH_DISABLE_SLEEP();if(getBits16(sys_stat_reg,per_is_down)){periph_init();}如果(arch_ble_ext_wakeup_get()){ARCH_SET_SLEEP_MODE(APP_DEFAULL_SLEEP_MODE);ARCH_BLE_FORCE_WAKEUP();ARCH_BLE_EXT_WAKEUP_OFF();app_easy_wakeup();}i2c_init();

My question is that whether sleep aftects I2C data communication, If yes how can i fix it ?

并且是MCU的最小特定睡眠时间,即如果我每30秒都将成功4到5中断,睡眠模式会正常工作。

请尽早帮助我

Thanks and Regards

Device:
PM_DIALOG.
离线
Last seen:12 hours 27 min ago
员工
加入:2018-02-08 11:03
Hi Utkarash,

Hi Utkarash,

是的,睡眠模式对I2C通信具有效果。当设备处于任何睡眠模式时,所有外围域(SPI。I2C,UART等)断电。这意味着当设备处于扩展睡眠模式时,不可能具有任何I2C活动。此外,请记住,如果在睡眠模式下配置的设备,则将在广告和连接间隔之间进入睡眠模式。

Could you please let us if there is an specific reason for using DA14583? Do you have any specific requirement?

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.xmece.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.xmece.com/products/bluetooth-module-da14531-smartbond-tiny

还有参考设计,您将帮助您减少开发阶段,因为您不需要花费这么多时间开发您的应用程序代码。

CodeLes

无附件允许您快速使用一组AT命令使用无线IOT应用程序。亚博国际官网平台网址Dodeless AT命令平台允许通过BLE控制本地UART连接的设备以​​及远程设备。您可以创建简单的演示/应用程序/概念证明,而无需任何代码开发亚博国际官网平台网址或在顶部构建您自己的应用程序!

https://www.dialog-seminile.com/produ亚博电竞菠菜cts/smartbond-codeless-commands.

对话框串行端口服务(DSP)

DSP模拟串行电缆通信。它为RS-232连接提供了简单的替代品,包括通过蓝牙低能量的熟悉的软件流控制逻辑。SPS软件分发包括应用程序和配置文件源代码并支持间隙中央/外设角色。

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

对于DA14531,您有一个完成的SW示例,用于读取I2C接口,并通过BLE通知将值发送到对等设备。您可以将其作为参考!

DA14531-DA14585-586 Reading I2C Accelerometer BLE

谢谢。PM_DIALOG.

Utkarash
离线
Last seen:6 months 2 weeks ago
加入:2019-01-18 06:36.
Thank you for your reply and

感谢您的回复和建议,

对不起,但是由于少量的采用,我将无法在此状态下更改对话框MCU或SDK,

在设备的下一个版本中,我将贴重地裁判新MCU和SDK的建议,

但是,我要求您使用Curennt版本的SDK和MCU帮助睡眠配置。

我已经分享了我推荐的代码Snipet,所以请你检查一下,让我知道我是否正确?

此外还在裁判BLE_APP_SLEEP_MODE示例后,我做出了延长睡眠模式的睡眠配置,请记住DA14583限制。

我陈述了Follwing行为。-

一旦我刷新代码并重新推回它,设备是广告,如果我再次重新推回设备,那么设备就停止了广告。

那么你可以帮忙,为什么设备停止广告是有什么我错过的?

请尽早帮助

感谢致敬

Utkarash

PM_DIALOG.
离线
Last seen:12 hours 27 min ago
员工
加入:2018-02-08 11:03
Hi Utkarash,

Hi Utkarash,

您是否从SPI Flash或System-RAM启动?您能否在调试模式下运行它,并检查它是否符合stauck(nmi,wdg,断言等)?

我想再次亮点,即当设备处于睡眠模式时,无法具有任何I2C活动。

Thanks, PM_Dialog

Utkarash
离线
Last seen:6 months 2 weeks ago
加入:2019-01-18 06:36.

感谢您的回复和建议,

您是否从SPI Flash或System-RAM启动?- 我正在使用spi flash启动,我使用构建过程后生成的十六进制文件,并使用智能播链工具,将文件转化为我的电路板。

您能否在调试模式下运行它,并检查它是否符合stauck(nmi,wdg,断言等)?- 现在的代码不会被困在NMI或WDG中,并解决了我提到的广告的问题。

我想再次亮点,即当设备处于睡眠模式时,无法具有任何I2C活动。——我完全明白I2C并不在extended sleep. However when i wake up the device from sleep at least then the I2C should work. Also in reference to this i am asking whether my sleep configuration which i have made are correct? i.e.,

如前所述,

对于睡眠模式,我已经引用了“BLE_APP_SLEEP_MODE”和“PROXY_REPORTER”示例代码,并在代码中进行了相应的更改
- 在user_config.h文件中

app_default_sleep_mode = arch_ext_sleep_on.

- 唤醒

ARCH_DISABLE_SLEEP();if(getBits16(sys_stat_reg,per_is_down)){periph_init();}如果(arch_ble_ext_wakeup_get()){ARCH_SET_SLEEP_MODE(APP_DEFAULL_SLEEP_MODE);ARCH_BLE_FORCE_WAKEUP();ARCH_BLE_EXT_WAKEUP_OFF();app_easy_wakeup();}

-For activating Sleep

ARCH_SET_SLEEP_MODE(ARCH_EXT_SLEEP_ON);

现在请检查这些陈述,如果我使用正确的代码,请告诉我是否使用正确的代码在睡眠中发送设备并唤醒它?

等待你的答复。

Thanks and Regards

Utkarsh

PM_DIALOG.
离线
Last seen:12 hours 27 min ago
员工
加入:2018-02-08 11:03
Hi Utkarsh,

Hi Utkarsh,

它似乎是正确的 - 你想停止广告并将设备放入永久睡眠模式吗?

使用此实施测量的功耗是多少?

还请检查DA14580的睡眠模式教程 - 链接提供:

//www.xmece.com/sites/default/files/training_04_sleep_mode_configurations.pdf

Thanks, PM_Dialog

Utkarash
离线
Last seen:6 months 2 weeks ago
加入:2019-01-18 06:36.
Thank you for your reply and

感谢您的回复和建议,

您想停止广告并将设备放入永久睡眠模式吗?- 不,我不想停止广告,也不想把设备放在永久睡眠中。请检查下面的指向GransanMD,我的设备应该睡觉,什么时候应该醒来?

-I wakeup the device when there is an interrupt from sensor update the advertising packets and after 5 secs again go to sleep and wait untill next interrupt is received from sensor.

这就是我如何需要睡眠工作,如果您需要了解传感器和我的申请,请参与我的初始帖子。

使用此实施测量的功耗是多少?--我已经断开了我的传感器,并仅测量了我在50到150微安的范围内(电流在此范围内变化的MCU电流),这对于我的情况不理想,我希望仅作为50微米的电流而不是超过50米浪费MCU。如在连接我的传感器后,它会再次增加。在测量当前时,我将推荐给您建议的相同教程。

还请检查DA14580的睡眠模式教程 - 链接提供: -I have refered this tutorial itself and implemented my sleep logic which i have shared with you also.

除此之外,我还有一个问题,在实施睡眠时,我经历了几个帖子,我发现下面通过对话框提到注释。

"Additionally, since it is DA14583, if the flash is NOW powered down, then the consumption will increased again.
There is a function in order to place the SPI in power down mode - spi_flash_power_down() - and in that case you won’t be able to interact with the flash unless you instruct the SPI flash to be powered up. Before starting to interact with the flash, you should invoke spi_flash_release_from_power_down()."

现在在我的情况下也是我使用DA14583所以我应该打扰这个吗?

如是,then with reference to this comment i have made these changes in my code Please check if it is correct?

  • Before sending device into sleep mode i call spi_flash_power_down, for example,
spi_flash_power_down();ARCH_SET_SLEEP_MODE(ARCH_EXT_SLEEP_ON);
  • 同时唤醒设备,再次重新安置SPI_POWER_DOWN模式,例如,
ARCH_DISABLE_SLEEP();spi_flash_release_from_power_down(); if (GetBits16(SYS_STAT_REG, PER_IS_DOWN)) { periph_init(); } if (arch_ble_ext_wakeup_get()) { arch_set_sleep_mode(app_default_sleep_mode); arch_ble_force_wakeup(); arch_ble_ext_wakeup_off(); app_easy_wakeup(); }

If No, then should ignore this comment in my case?

请尽早帮助.

Thanks and regrads

Utkarash

PM_DIALOG.
离线
Last seen:12 hours 27 min ago
员工
加入:2018-02-08 11:03
Hi Utkarsh,

Hi Utkarsh,

您也可以使用 - SPI_FLASH_POWER_DOWN() - 在DA14583中,因此您可以关闭闪光灯。这将降低睡眠模式下的电流消耗。然后,当芯片唤醒时,您应该调用-da14583_spi_flash_release() - 从下电模式释放闪光灯。

>>>在将设备发送到睡眠模式之前,我调用spi_flash_power_down,例如,

I don’t see anything work - you are calling the correct APIs.

>>>And while waking the device up i again relaese the spi_power_down mode, for example,

请尝试使用da14583_spi_flash_release()而不是spi_flash_release_from_power_down()。

Thanks, PM_Dialog

Utkarash
离线
Last seen:6 months 2 weeks ago
加入:2019-01-18 06:36.
Thank you for your reply and

感谢您的回复和建议,

请尝试使用da14583_spi_flash_release()而不是spi_flash_release_from_power_down()。--Thank you for your suggestion, i will make the respective changes.

感谢致敬