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 at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
16个帖子/ 0新
Last post
marios
离线
Last seen:3个月1周前
加入:2017-05-09 20:27
Eextended deep sleep DSPS

Hello dialog!

we want to enable the deep sleep mode for dsps we have changed the configured value on the user_config.h in kel project to

const static sleep_state_t app_default_sleep_mode = ARCH_EXT_SLEEP_ON;

此外,我们还在config_basic.h中禁用了调试模式

#undef cfg_development_debug.

在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.

Any further help much apreciated i have the atached images.

Thanks in advance,
玛罗斯

设备:
PM_Dialog
离线
Last seen:1天19小时前
工作人员
加入:2018-02-08 11:03
嗨玛丽奥斯,

嗨玛丽奥斯,

DSP参考应用程序代码不支持深度睡眠配置。除了深度睡眠模式的需求还需要燃烧到OTP。请检查介绍部分UM-B-038 : User Manual for Dialog Serial Port Profile (DA14580)来自我们的支持页面的用户手册。Both central and peripheral devices can operate either in Active mode or Extended sleep and not in deep sleep mode. By undefining the CFG_DEVELOPMENT_DEBUG, you disable the debug mode, so you will not able to hot attach debugger and get debug information. For example if a Hardfault or NMI will be occurred, you will not able to catch it. Also, if the CFG_DEVELOPMENT_DEBUG is enable, you can emulate the deep sleep mode without programming the OTP memory, but ni DSPS application as I have already mentioned, the deep sleep is not supported. Regarding the CFG_UART_HW_FLOW_CTRL definition, please read the 5.1.3 section of the user manual. The DSPS provides both software (XON/XOFF) and hardware (RTS/CTS) flow control schemes, respectively selected by the CFG_UART_SW_FLOW_CTRL and CFG_UART_HW_FLOW_CTRL definitions in the user_periph_setup.h configuration file. Could you please run your code in development mode, hot attach the debugger and find the reason that the code crashes when the device enters the sleep mode> The most possible reason why the device never wakes up after is that the code stops due to a Hardfault or an NMI, so it stops advertising and you are not able to discover it with the DSPS mobile application. Please, configure you device in extended sleep mode first and define the CFG_DEVELOPMENT_DEBUG.

Thanks, PM_Dialog

marios
离线
Last seen:3个月1周前
加入:2017-05-09 20:27
你好谢谢你的快速

你好谢谢你的快速reply !!
是的,你有权利我的意思是延长睡眠模式!

We want the Da14580 to enter the extended sleep mode that we know suppurted in DSPS ,
to have optimised power consumption .

We use external atmel processor on our custom board everything works well in active mode.

如何获得DA14580进入睡眠?

1) When is not descover process from a phone the da 14580 goes to sleep
2)
if we discover from phone then awakes and conect
And transmit data

Now we have 600 uA

Thanks in advance,
玛罗斯

PM_Dialog
离线
Last seen:1天19小时前
工作人员
加入:2018-02-08 11:03
嗨玛丽奥斯,

嗨玛丽奥斯,

要将DA14580获取扩展睡眠模式,您应该使用正确的定义为user_config.h头文件配置App_default_sleep_mode值。请检查以下代码片段:

  • Extended sleep mode configuration const static sleep_state_t app_default_sleep_mode = ARCH_EXT_SLEEP_ON;
  • Active mode configuration const static sleep_state_t app_default_sleep_mode = ARCH_SLEEP_OFF;

Be aware that the device goes into sleep between advertising/connection intervals. Could you please clarify this: “if we discover from phone then awakes and connect? For getting more information about the DSPS reference application code, please read theUM-B-038 : User Manual for Dialog Serial Port Profile (DA14580)来自我们的支持页面的用户手册。在本文档中,您将能够了解DSP的体系结构和软件实现细节。如果您发现上述任何答案有用请标记其中一个接受。

Thanks, PM_Dialog

marios
离线
Last seen:3个月1周前
加入:2017-05-09 20:27
Hello PM_Dialog!

Hello PM_Dialog!

Thanks for your quick reply !

你能从你身边检查代码吗?

please help us to slove this huge curent consumption of 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.

我们希望获得1,6 ua或类似的东西。

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

I have atached some photos.

Thanks in advanse for your precious help !

Glad to hear you soon !

In advance,
玛罗斯

在tachment:
PM_Dialog
离线
Last seen:1天19小时前
工作人员
加入:2018-02-08 11:03
嗨玛丽奥斯,

嗨玛丽奥斯,

~ 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.

Thanks, PM_Dialog

marios
离线
Last seen:3个月1周前
加入:2017-05-09 20:27
Hello PM_Dialog !

Hello 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)我们已经将UART TX GPIO从默认PO_5更改为P 1_3,因为我们在SPI Flash期间发生冲突就是这样

corect ?

Any suggestions about that ? wich pin we may use to avoid conflict with spi ?

RX GPIO引脚P0_4仍然默认为仍然存在。

我们还没有连接CTS和RTS引脚是这种销钉的推销,可以使用HW流量控制吗?

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

part of the code we add or configure this parameter ?

3)我们已经测量了我们的电路板,没有DA14580芯片24 UA的正常功耗

Thanks in advance,
玛罗斯

在tachment:
PM_Dialog
离线
Last seen:1天19小时前
工作人员
加入:2018-02-08 11:03
嗨玛丽奥斯,

嗨玛丽奥斯,

  1. 如果您想从SPI Flash启动,请澄清您是否可以澄清?如果是,请注意DA14580靴子标准GPIOS。请检查表1的AN-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.

Thanks, PM_Dialog

marios
离线
Last seen:3个月1周前
加入:2017-05-09 20:27
Hello PM_Dialog!

Hello PM_Dialog!

感谢您的快速回复!由于您在附加的图像上看到,我们最终终于使用上述配置进行了预期的低功耗。但是,当我们在扩展睡眠模式时,我们无法将任何数据收到到另一边。当我们处于活动模式时,一切都按预期工作。

The system broadcast and we are able to connect and try to send data but with no success.

1) we use the Hw flow control. how to set up the CTS and RTS pins ?
2)此引脚需要在我们的Atmel处理器上连接,如果是,则需要高或低?
3)我们可以在没有这些引脚的情况下使用HW流量控制吗?如果是的话怎么样?

Thanks in advance,
玛罗斯

PM_Dialog
离线
Last seen:1天19小时前
工作人员
加入:2018-02-08 11:03
嗨玛丽奥斯,

嗨玛丽奥斯,

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?

Thanks, PM_Dialog

marios
离线
Last seen:3个月1周前
加入:2017-05-09 20:27
Hello PM_Dialog!

Hello PM_Dialog!

感谢您的快速回复!

1) Yes the DA14580 advertising and we can conect with it.
2) we send data with the dsps app and nothing comes in the other side.

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

We have read the UM-B-038 : User Manual for Dialog Serial Port Profile (DA14580) but it's not clear.
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外设设置头文件。
*
* Copyright (C) 2012. Dialog Semiconductor Ltd, unpublished work. This computer
*计划包括机密,专有信息,是一个商业秘密
*对雷竞技电竞平台话半导体有限公司禁止所有使用,披露和/或复制
* unless authorized in writing. All Rights Reserved.
*
* and contributors.
*
****************************************************************************************
*/

#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”
/*
* DEFINES
****************************************************************************************
*/

#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配置* /
/****************************************************************************************/

#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 configuration */
/****************************************************************************************/

#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
/*
* FUNCTION DECLARATIONS
****************************************************************************************
*/

void periph_init(void);

void GPIO_reservations(void);

#endif // _user_periph_setup_h_

Thanks in advance,
玛罗斯

MT_dialog
离线
Last seen:2 months 1 week ago
工作人员
加入:2015-06-08 11:34
Hi Marios,

Hi Marios,

参考设计用途的RTS / CTS是具有H / W流量控制的标准UART,Atmel的RTS转到580的CT和相应的连接
的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).

Thanks MT_dialog

marios
离线
Last seen:3个月1周前
加入:2017-05-09 20:27
Hello PM_Dialog!

Hello PM_Dialog!

感谢您的快速回复!

谢谢你的含量信息!

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

2) Also the Hw flow control can be used without these pins ? CTS /RTS is something that we can do because we only use to the recieve data from DA14580 not to transmit.

谢谢 !!!
Glad to hear you soon !
玛罗斯

MT_dialog
离线
Last seen:2 months 1 week ago
工作人员
加入:2015-06-08 11:34
嗨玛丽奥斯,

嗨玛丽奥斯,

  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

marios
离线
Last seen:3个月1周前
加入:2017-05-09 20:27
Hello PM_Dialog!

Hello PM_Dialog!

感谢您的快速回复!

我们的处理器睡眠状态,等待DA14580唤醒它,当数据从DSPS应用程序中获取数据时我们如何设置这个?

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

当DA14580没有传输数据时,我们希望来自DA14580的RTS信号恒定恒定,当DA14580具有传输RTS信号时,应低电平。
.We have observed that when DA14580 before pairring the RTS signal is high and goes low every 1 second period which is the advertising period. This causes many problems as it wakes up
our controller for no reason. Aditionally when pairing with DA14580 we observe fast variations on RTS signal. Again this causes wake up problems on out processor. Only when DA14580
接收数据以传输RTS信号稳定恒定。因此,我们必须更改DA14580软件,以便在广告和剪辑期间在RTS处具有稳定的高电平信号。

请回复我们如何影响DA14580软件以具有RTS信号陈旧的Bahavior。

I have atached the above measurement of the RTS.

Thanks so much for your great interest in our requests
Glad to guide us to this goal
thanks in advance ,
玛罗斯

在tachment:
MT_dialog
离线
Last seen:2 months 1 week ago
工作人员
加入:2015-06-08 11:34
嗨玛丽奥斯,

嗨玛丽奥斯,

Well, the 580 when operating with the DSPS firmware when the device wakes up it will toggle the RTS line to low in order to indicate that it he is ready (the device will pull the
RTS低于它醒来时,在每个连接间隔或广告间隔中,也请注意,当设备接收时,当数据传输到内部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.

Thanks MT_dialog