的帮助!的帮助!的帮助!不能去深度睡眠模式

10个帖子/ 0新
最后一篇
兰迪宇
离线
最后一次露面:2 years 10 months ago
加入:2015-01-28 08:49
的帮助!的帮助!的帮助!不能去深度睡眠模式

my project is modify from DSPS project.My configure as the below
const static sleep_state_t app_default_sleep_mode = arch_deep_sleep_on;
#undef CFG_BOOT_FROM_OTP

#undef CFG_MEM_MAP_EXT_SLEEP
#define cfg_mem_map_deep_sleep.

#undef cfg_development_debug.

static const struct advertise_configuration user_adv_conf = {
.............
///广告的最小间隔

.intv_min = MS_TO_BLESLOTS(10000), // 100ms (160*0.625ms)

/// Maximum interval for advertising

.intv_max = ms_to_bleslots(10000),// 100ms(160 * 0.625ms)
......
}

我的睡眠api定义如下

app_easy_gap_disconnect(spss_env.con_info.conidx);

power_off_humi_sensor();

app_easy_gap_advertise_stop();

arch_set_deep_sleep();

ARCH_BLE_EXT_WAKEUP_ON();,

In order to facilitate the test I put these code in the function of user_on_connection,as below
void user_on_connection(uint8_t connection_idx, struct gapc_connection_req_ind const *param)
{
app_easy_gap_disconnect(spss_env.con_info.conidx);

power_off_humi_sensor();

app_easy_gap_advertise_stop();

arch_set_deep_sleep();

ARCH_BLE_EXT_WAKEUP_ON();
}

当连接代码时,通过Printf我已经看到了user_on_disconnect在执行后执行
app_easy_gap_disconnect(spss_env.con_info.conidx);
但该器件不睡眠深入睡眠。当前是1.46mA

还存在一个奇怪的问题,我的JTAG可以在调试中使用,虽然我打开宏Const static sleep_state_t app_default_sleep_mode = arch_deep_sleep_on;

I have cost 3 days the realize the deep sleep mode for my product,many topics in forums had seen and include UM-B-006 and traning_04 ,but still very disorder.In the forums I find someone only configure the Macro can realize sleep. Don't need used some API like arch_set_deep_sleep() to support it? If need,the deatils of traning_04 is misleading.

如果你能给我一个详细的指导,我会非常伟大。谢谢你的重播!

Device:
兰迪宇
离线
最后一次露面:2 years 10 months ago
加入:2015-01-28 08:49
I put the code in main,is

我把代码放在主要,也没有使用
int main_func(void)
{
sleep_mode_t sleep_mode;

//全球初始化
system_init();

/*
* * * *** * * *** * * *** * * *** * * *** * * *** * * *** * * *** * * *** * * ************************************
*平台初始化
* * * *** * * *** * * *** * * *** * * *** * * *** * * *** * * *** * * *** * * ************************************
* /
arch_set_deep_sleep();
ARCH_BLE_EXT_WAKEUP_ON();
while(1)
{
做 {
//安排所有待处理的事件
schedule_hile_ble_on();
}

mt_dialog.
离线
最后一次露面:3 months 6 hours ago
职员
加入:2015-06-08 11:34
Hi RandyYu,

Hi RandyYu,

I am not sure about having the DSPS in deep sleep mode will operate properly since only the extended sleep mode is supported, as indicated in the application note (Introduction section), with some trials i had with your modifications it didn't even advertise. The arch_set_deep_sleep() function and arch_set_extended_sleep() functions are use in order to dynamically change the sleep mode of your device while operating, just by placing the ARCH_DEEP_SLEEP_ON in the app_default_sleep_mode is enough to go into deep sleep. Also in order to properly operate in deep sleep you will have to burn you code in OTP in order for the OTP mirroring to occur, in development mode and no OTP burned the device is in extended sleep mode, but still the current you see for permanent sleep is too much. You can run your project on a dev kit and check if the device falls into sleep mode after disconnection.

谢谢mt_dialog.

兰迪宇
离线
最后一次露面:2 years 10 months ago
加入:2015-01-28 08:49
我有一个da14580devkt-b,

我有一个da14580devkt-b,电路板与traning_04使用不同,你能告诉我如何测量当前。最好给我一个关于董事会的PDF。

而且我想知道哪个版本的Dev套件是最新的,如何购买?我在中国。
谢谢你

兰迪宇
离线
最后一次露面:2 years 10 months ago
加入:2015-01-28 08:49
正如你所说的那样“只是通过放置

正如您所说的,“只是通过将Arch_Deep_sleep_on放在App_default_sleep_mode中足够深入睡眠”
I have a question,where and when set the device to sleep(the code)?I use Jatg add a breakpoint before WFI(),But the program could not execution at here.Don't all sleep events process at this position?

兰迪宇
离线
最后一次露面:2 years 10 months ago
加入:2015-01-28 08:49
Is there have some special

是否存在一些特殊的GPIO请求在睡眠模式下配置?
如果芯片落在睡眠模式下,并且电流是leg(1.4mA),通常会导致这个问题的原因是什么?

mt_dialog.
离线
最后一次露面:3 months 6 hours ago
职员
加入:2015-06-08 11:34
Hi RandyYu,

Hi RandyYu,

培训的套件是您使用的Pro套件和套件是基本套件,它们的主要区别是Pro套件包括的功​​率测量电路。除了电路板几乎是相同的标题,以便测量功耗。Pro套件(具有电源测量电路的Pro套件是与智能片段上的电源分布器兼容的那个)。

该设备在主循环中执行一系列检查,如果有挂起消息,请检查内核的队列如果它计算睡眠持续时间的量。

No the GPIOs aren't involved in the sleep procedure from the SDK, i mean that you can set a GPIO to wake up your device but this is not implemented by default and the DSPS doesn't implement it. Regarding the 1.4 milliamperes you see is quite enough for the DSPS even when not sleeping, are you sure that the 580 is consuming that power and not the sensor that is attached ?

谢谢mt_dialog.

兰迪宇
离线
最后一次露面:2 years 10 months ago
加入:2015-01-28 08:49
thanks for your replay,I have

感谢您的重播,我已经检查了问题,APOSES indciate LED消耗了很多电源,当删除它时,它仍然很多时间调试,我发现程序不能超出(BLE_IS_POWERED())。

我想知道这个功能的三个术语
静态内联bool ble_is_powered()
{
return ( (GetBits16(CLK_RADIO_REG, BLE_ENABLE) == 1) && \
(getBits32(BLE_DEEPSLCNTL_REG,Deep_sleep_stat)== 0)&&
!(rwip_prevent_sleep_get() & RW_WAKE_UP_ONGOING));
}

Q1:用户需要考虑哪一个,需要我编写setbits16(clk_radio_reg,ble_enable,0)?或者所有这些都由核心事件处理,我不需要关心?

Q2:我还没有在da14580_ds_v3.3中找到ble_deepslcntl_reg.w.这是什么意思?

我的睡眠是如下配置,它在user_on_connection中调用
app_easy_gap_disconnect(spss_env.con_info.conidx);
app_easy_gap_advertise_stop();
power_off_humi_sensor();
ARCH_BLE_EXT_WAKEUP_ON();
arch_set_deep_sleep();
lock_sleep_mode = true;

Also I have test after system_init();
arch_turn_peripherals_off(mode_deep_sleep);
WFI();
在两个句子之后。我可以测量电流为6.5μA,所以我认为我的电路板是OK,大电流不包括传感器消耗

兰迪宇
离线
最后一次露面:2 years 10 months ago
加入:2015-01-28 08:49
我很高兴告诉你,我

很高兴告诉你,我只是把它的问题加剧了。我将其修改为扩展DSP Project.I成功的睡眠模式,
但也有一些问题
1.如何配置睡眠时间,我希望它睡得更长?
2.Does there have a parameter to control the advertise time?Because I found the advertise time is very short.
3.在advertise_configuration struct中介绍了什么是intv_min和intv_max?
我并不真正了解广告意义的最低/最大间隔!
它是否可以是广告间隔的固定值?
4.我在电路板中使用DIP开关,当它开启时,DA14580引脚将读取高电平。但是当开关打开时,我发现了,电流将变大,更多更大。
can you tell me how can I handle it before sleep and after wake up

感谢您的帮助。

mt_dialog.
离线
最后一次露面:3 months 6 hours ago
职员
加入:2015-06-08 11:34
Hi RandyYu,

Hi RandyYu,

如我之前的帖子所示,DSP不设计用于在深度睡眠模式下运行,无论如何都很高兴您达到了目标。

1)关于睡眠时间,您选择广告的时间越长,您的间隔越多,您将越多,您将越多,所以更大的广告间隔,更大的连接间隔意味着更多的睡眠时间。

2) Yes, you can change the advertising parameters in the user_adv_conf structure at the .intv_min and .intv_max members at the user_config.h file.

3) Please check answer 2. Regarding the min and max values you can set them at the same value in order to have a fix advertising interval. The reason for this min and max in advertising is used by the BLE spec in order to give to the controller some padding in order to detrmine the best advertising interval given other activities.

4)我不太接受你的问题,我想有一些泄漏导致这个额外的电流,你可以重新配置交换机的输入引脚,以避免在退出时使用runtimer期间的GPIO_CONFIGUREPIN()避免这种效果。进入睡眠模式。

谢谢mt_dialog.