Eextended deep sleep DSPS

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads athttps://www.dialog-seminile.com/support.。我们将在未来几天修复错误/优化搜索和标记。
16 posts / 0 new
最后一篇
玛罗斯
Offline
最后一次露面:3 months 1 week ago
加入:2017-05-09 20:27
Eextended deep sleep DSPS

Hello dialog!

我们希望为DSP启用深度睡眠模式,我们已在KEL项目中更改了user_config.h上的配置值

const static sleep_state_t app_default_sleep_mode = arch_ext_sleep_on;

Also we have disabled the debug mode at the config_basic.h

#undef CFG_DEVELOPMENT_DEBUG

At user_periph_setup.h on keil we have changed to:

#define cfg_uart_hw_flow_ctrl.
#undef CFG_UART_HW_FLOW_CTRL

when we power on the divice we have battery operated device and we have a broadcast for 10 sec and stops probably goes to sleep but never wakeup again when we discover with the dsps app.

任何进一步的帮助,我有actached图像。

提前致谢,
Marios

Device:
PM_DIALOG.
Offline
最后一次露面:2 days 12 hours ago
职员
加入:2018-02-08 11:03
Hi marios,

Hi marios,

The DSPS reference application code does not support deep sleep configuration. Apart from that the deep sleep mode demands to burn to OTP. Please check the Introduction section ofUM-B-038 : User Manual for Dialog Serial Port Profile (DA14580)来自我们的支持页面的用户手册。中央和外围设备都可以在活动模式下或延长睡眠而不是深度睡眠模式操作。通过拒绝cfg_development_debug,您可以禁用调试模式,因此您无法热热连接调试器并获得调试信息。例如,如果将发生硬肢或NMI,则无法捕获它。此外,如果启用CFG_DEVELINMENT_DEBUG,则可以在不编程OTP内存的情况下模拟深度睡眠模式,但是NI DSPS应用程序,因为我已经提到,不支持深度睡眠。关于CFG_UART_HW_FLOW_CTRL定义,请阅读用户手册的5.1.3部分。DSP提供了软件(XON / XOFF)和硬件(RTS / CTS)流控制方案,分别由user_periph_setup.h配置文件中的cfg_uart_sw_flow_ctrl和cfg_uart_hw_flow_ctrl定义选择。请您可以在开发模式下运行代码,热连接调试器,并找到代码在设备进入睡眠模式时崩溃的原因>如果代码由于硬盘驱动器之后,设备永远不会醒来的最可能原因或者是NMI,所以它停止广告,您无法使用DSP移动应用程序发现它。请首先在扩展睡眠模式下配置您的设备,并定义CFG_DEVELVEMMENT_DEBUG。

谢谢,PM_DIALOG.

玛罗斯
Offline
最后一次露面:3 months 1 week ago
加入:2017-05-09 20:27
Hello thanks for your quick

Hello thanks for your quick reply !!
Yes you have right i mean extended sleep mode !

我们希望DA14580进入我们知道在DSP中所用的扩展睡眠模式,
to have optimised power consumption .

我们在我们的自定义板上使用外部Atmel处理器一切都在活动模式下运行良好。

How to get DA14580 to enter sleep ?

1)当不是手机中的删除过程时,DA 14580睡觉
2)
如果我们从手机发现,那么醒来并恰好
And transmit data

现在我们有600 ua

提前致谢,
Marios

PM_DIALOG.
Offline
最后一次露面:2 days 12 hours ago
职员
加入:2018-02-08 11:03
Hi marios,

Hi marios,

In order to get the DA14580 into extended sleep mode, you should configure the app_default_sleep_mode value with the proper define into the user_config.h header file. Please, check the code snippets below:

  • Extended sleep mode configuration const static sleep_state_t app_default_sleep_mode = ARCH_EXT_SLEEP_ON;
  • 活动模式配置const static sleep_state_t app_default_sleep_mode = arch_sleep_off;

请注意,设备在广告/连接间隔之间睡眠。你能澄清一下:“if we discover from phone then awakes and connect?要获取有关DSP参考应用程序代码的更多信息,请阅读UM-B-038 : User Manual for Dialog Serial Port Profile (DA14580)来自我们的支持页面的用户手册。In this document, you will be able to learn about the architecture and the software implementation details of the DSPS. If you found any of the above answers useful please mark one of them as accepted.

谢谢,PM_DIALOG.

玛罗斯
Offline
最后一次露面:3 months 1 week ago
加入:2017-05-09 20:27
Hello PM_Dialog!

Hello PM_Dialog!

Thanks for your quick reply !

can you check the code from your side ?

请帮助我们将这种巨大的顽固消耗Slove为600 ua

How i can send you the dsps project to test on your side because i can't upload more than 10 Mb on the forum.

we want to achive the 1,6 uA or something similar will be ok.

We have the same curent consumtion in active and with the extended sleep mode.

我的一些照片。

谢谢你的珍贵帮助!

Glad to hear you soon !

提前,
Marios

附件:
PM_DIALOG.
Offline
最后一次露面:2 days 12 hours ago
职员
加入:2018-02-08 11:03
Hi marios,

Hi marios,

~ 1.6 ua功耗时实现device is in sleep mode with no activity at all. The DSPS example doesn't fall into permanent sleep but keeps on waking up and goes to sleep depending on its advertising and connection interval, so there is no way to see ~1.6uA power consumption. This means that the device goes into extended sleep between advertising and connection intervals. Also, the DSPS example uses the UART for receiving and transmitting data, so the power consumption will be quite increased. Could you please clarify if you are using an external SPI flash? If yes, be aware that the SPI flash on your board is also increasing the power consumption if you don’t power it down (via the power down command of the flash- spi_flash_power_down()). In case you have a custom board, as I am able to see from the pdf, I strongly suggest you to check if you have any components into your board that increase the power consumption. It is not needed to upload you DSPS project, because the most possible reason of the increased power consumption does not come from the DSPS code. Also, could you please let me know when are you getting the 600uA current consumption? When you transmitting or receiving data? Please, try to review your PCB first.

谢谢,PM_DIALOG.

玛罗斯
Offline
最后一次露面:3 months 1 week ago
加入:2017-05-09 20:27
你好PM_DIALOG!

你好PM_DIALOG!

Thanks for your quick reply !

1) Yes we are using external spi flash memory that is recommended from dialog (Smartbond w25x20CL)

I have attached the overall source code configuration and the power consumption with da14580 on our custom board.

2)We have changed the UART TX GPIO from default PO_5 to p 1_3 because we have conflict during spi flash is that

隐窝?

有关这一点的任何建议吗?我们可以用来避免与SPI冲突?

The RX GPIO pin P0_4 remains as is by default.

We haven't connect the cts and rts pins is this pins neasessary to use HW flow control ?

As you mentioned on the previous post " (via the power down command of the flash- spi_flash_power_down()" Ii wich

我们添加或配置此参数的代码的一部分?

3) We have measured our board and has normal power consumption without the DA14580 chip 24 uA

提前致谢,
Marios

附件:
PM_DIALOG.
Offline
最后一次露面:2 days 12 hours ago
职员
加入:2018-02-08 11:03
Hi marios,

Hi marios,

  1. 请澄清如果你想启动the SPI flash? If yes, be aware that the DA14580 boots from standard GPIOs. Please check the Table 1 of theAN-B-001 : DA14580/581/583 Booting from serial interfaces来自我们的支持门户的文档。
  2. You have correctly configured the UART TX GPI, you are able to use any pin you want for the UART configuration. In case you are using HW flow control you should connect the CTS/RTS pins.
  3. The most possible reason of the increased power consumption is that you probably have a current leakage into your board. Since you configured the device into the extended sleep mode, you should not have 600uA power consumption, so I suppose that it is note a software based issue. The consumption that you measured is when you are sending or receiving data? As I have already mentioned, the DSPS project does not enter the extended sleep permanently. Could you please let me know if you are able to connect with the DSPS android application and if you are able to send/receive data? I strongly suggest you use the ble_app_sleepmode example of the SDK and measure the power consumption since the device enters the sleep mode. Which is the power consumption using this example of the SDK?
  4. If you undefine the CFG_DEVELOPMENT_DEBUG, be aware that you will not be able to hot attach the debugger.

谢谢,PM_DIALOG.

玛罗斯
Offline
最后一次露面:3 months 1 week ago
加入:2017-05-09 20:27
Hello PM_Dialog!

Hello PM_Dialog!

感谢您的快速回复!we have finally archived low power consumption as expected with the above configuration as you can see on the attached image. but we can't receive any data to the other side when we are on extended sleep mode . When we are in active mode everything works as expected.

系统广播,我们能够连接并尝试发送数据但没有成功。

1)我们使用HW流量控制。如何设置CTS和RTS引脚?
2)This pins needs to be connected on our Atmel processor and if yes need to be high or low ?
3) Can we use the HW flow control without these pins ? and if yes how ?

提前致谢,
Marios

PM_DIALOG.
Offline
最后一次露面:2 days 12 hours ago
职员
加入:2018-02-08 11:03
Hi marios,

Hi marios,

Please check the GPIO_reservations() and set_pad_functions() functions in the user_periph_setup.c file and you will find the setup of the UART GPIOs. If you decide to use hardware flow control, you should use the CTS/RTS pins. Could you please check if CFG_UART_HW_FLOW_CTRL is defined in user_periph_setup.h header file? This definitions enables/disables the hardware flow control. Also, I strongly suggest you to check if the DSPS is working correctly using our DSPS mobile application and try to send some bytes to your device. Are you able to see that your device is advertising?

谢谢,PM_DIALOG.

玛罗斯
Offline
最后一次露面:3 months 1 week ago
加入:2017-05-09 20:27
Hello PM_Dialog!

Hello PM_Dialog!

感谢您的快速回复!

1)是的DA14580广告,我们可以与之连接。
2)我们将数据与DSP应用程序发送,另一边没有任何东西。

How to use The CTS and RTS pins what is the proper conection to our atmel processor ?

我们已阅读UM-B-038:对话框串口配置文件(DA14580),但尚不清楚。
can you give us more info about that.

what is the timing diagram for the CTS/RTS handshake to determine when if is needed to be high or low to start and stop receving data the DA14580 from the DSPS aplication ?

/**
****************************************************************************************
*
* @file user_periph_setup.h.
*
*@brief Peripherals setup header file.
*
*Copyright (C) 2012. Dialog Semiconductor Ltd, unpublished work. This computer
*program includes Confidential, Proprietary Information and is a Trade Secret of
*Dialog Semiconductor Ltd. All use, disclosure, and/or reproduction is prohibited
*unless authorized in writing. All Rights Reserved.
*
*和贡献者。
*
****************************************************************************************
*/

#ifndef _user_periph_setup_h_
#define _user_periph_setup_h_

/*
*INCLUDE FILES
****************************************************************************************
*/

#include "rwip_config.h"
#include“global_io.h”
#include "arch.h"
#include "da1458x_periph_setup.h"
#include“i2c_eeprom.h”
/*
*定义
****************************************************************************************
*/

#undef CFG_UART_SW_FLOW_CTRL
#define cfg_uart_hw_flow_ctrl.

/// Available baud rates 115200, 57600, 38400, 19200, 9600
#define CFG_UART_SPS_BAUDRATE UART_BAUDRATE_9K6
/* Enable WKUPCT. Required by wkupct_quadec driver. */
#define WKUP_ENABLED

/ **************************************************************************************** /
/* UART configuration */
/ **************************************************************************************** /

#define GPIO_UART1_TX_PORT GPIO_PORT_0
#define GPIO_UART1_TX_PIN GPIO_PIN_4
#define GPIO_UART1_RX_PORT GPIO_PORT_1
#define gpio_uart1_rx_pin gpio_pin_3.
#define GPIO_UART1_RTS_PORT GPIO_PORT_0
#define GPIO_UART1_RTS_PIN GPIO_PIN_3
#define GPIO_UART1_CTS_PORT GPIO_PORT_0
#define GPIO_UART1_CTS_PIN GPIO_PIN_2

/ **************************************************************************************** /
/ * UART2 GPIO配置* /
/ **************************************************************************************** /

#ifdef CFG_PRINTF_UART2
#define GPIO_UART2_TX_PORT GPIO_PORT_1
#define GPIO_UART2_TX_PIN GPIO_PIN_2

#define GPIO_UART2_RX_PORT GPIO_PORT_1
#define GPIO_UART2_RX_PIN GPIO_PIN_3
#endif
/*
*功能声明
****************************************************************************************
*/

void periph_init(空白);

void gpio_reservations(无效);

#endif // _USER_PERIPH_SETUP_H_

提前致谢,
Marios

mt_dialog.
Offline
最后一次露面:2 months 1 week ago
职员
加入:2015-06-08 11:34
Hi Marios,

Hi Marios,

The RTS/CTS that the reference design uses is standard UART with H/W flow control, the RTS of the ATMEL goes to the CTS of the 580 and the corresponding connection
的RTS ATMEL 580和CTS。像罗ng as the external processor fw or whatever controls the UART on the ATMEL complies with the UART protocol using HW flow control then youshould be able to communicate. I would suggest to first try use an FTDI cable and connect the DSPS device with a PC as the User Manual (UM-B-038) suggests or try to trace the UART lines of the 580 and check if the 580 actually sends data but for some reason you cannot receive it on the other side. Also in the document the proper connections are also presented (Paragraph 8).

谢谢mt_dialog.

玛罗斯
Offline
最后一次露面:3 months 1 week ago
加入:2017-05-09 20:27
Hello PM_Dialog!

Hello PM_Dialog!

感谢您的快速回复!

Thanks for the usefull informatition!

1) is it possible to use S/W flow control and have
Low power consumption ? If yes how ?

2)还可以使用HW流量控制而没有这些引脚?CTS / RTS是我们可以做的事情,因为我们仅用于来自DA14580的接收数据而不传输。

Thanks you !!!
Glad to hear you soon !
Marios

mt_dialog.
Offline
最后一次露面:2 months 1 week ago
职员
加入:2015-06-08 11:34
Hi marios,

Hi marios,

  1. There are drawbacks in sw flow control and its partially supported when operating with extended sleep only incoming data can be controlled be the DA14580, any incoming XON/XOFF will be ignored during sleep time (this is also mentioned in the UM-B-038). Software flow control is fully supported in active mode.
  2. HW flow control is the CTS/RTS pins, with no CTS/RTS pins you have only UART with no flow control at all.

Thanks MT_Dialog

玛罗斯
Offline
最后一次露面:3 months 1 week ago
加入:2017-05-09 20:27
Hello PM_Dialog!

Hello PM_Dialog!

感谢您的快速回复!

Our processor is in sleep and waits for DA14580 to wake it when data is available from the dsps app how we set up this ?

我们已经为HW流量控制配置了CTS / RTS引脚。

we want the RTS signal from the DA14580 to be constant high when DA14580 has not data for transmition and when DA14580 has data to transmit the RTS signal should go low.
。我们已经观察到,当BA14580之前的DA14580在配对之前,每个1秒钟都低于广告时段。这会导致许多问题醒来
我们的控制器无缘无故。与DA14580配对时,我们观察RTS信号的快速变化。这会导致唤醒处理器的问题。只有在DA14580时
receives data to transmit RTS signal goes stabily constant low. Therefore we have to change the DA14580 software in order to have stable high level signal at RTS during advertising and pairring periods.

PLEASE reply how we affect the DA14580 software to have RTS signal stale bahavior.

I have atached the above measurement of the RTS.

非常感谢您对我们的要求感兴趣
很高兴引导我们实现这一目标
提前致谢 ,
Marios

附件:
mt_dialog.
Offline
最后一次露面:2 months 1 week ago
职员
加入:2015-06-08 11:34
Hi marios,

Hi marios,

嗯,580当使用DSP固件操作时设备醒来时它会将RTS线路切换到低,以便指示他准备就绪(设备将拉动
RTS low whenever it wakes up, in every connection interval or advertising interval, also be aware that when the device is receiving, when the data transmited reach the internal FIFO
threshold the RTS will go back to high to notify to the other side that it should stop send data). In the DSPS the RTS signal is controlled by the HW and by software (whenever the Rx FIFO gets in a specific threshold the hw will automatically pull high the RTS in order to indicate to the other side not to send any data). If you would like to change this then you can either change the UART configuration in the uart_sps_init() or remove the CTS functionallity from the pin.

谢谢mt_dialog.