关于睡眠的一些问题

12 posts / 0 new
Last post
RandyYu
Offline
Last seen:2年10个月前
加入:2015-01-28 08:49
关于睡眠的一些问题

My project is modified from DSPS,and I want my slave device go to sleep mode after send 10 packets data to host.And after some minutes wakeup it ,repeat the process.
1.我想知道如何实现这一功能。我浏览了数据表-UM-B-006和Training_04,我对这两个文件的关系非常困惑。第一个数据表似乎非常复杂,第二个数据表似乎非常复杂步骤可以实现睡眠状态。有一个更容易理解和完全的工作表。

thank you

设备:
MT_dialog
Offline
Last seen:2个月3周前
Staff
加入:2015-06-08 11:34
嗨兰迪宇,

嗨兰迪宇,

The 580 sleeps between the advertising and the connection intervals, you would like to fall in permanent sleep ? or you dont sleep between the intervals (you have sleeping feature disabled) and you would like to keep the connection alive by enabling sleep again ? In order to enable the sleeping feature, in case you dont sleep, you can invoke the arch_set_extended sleep, this will allow you to sleep between the connection and the advertising intervals, in case you want to disconnect from the central and fall into permanent sleep you will have to issue a disconnection in order to stop all the BLE activities (dont start advertising) and invoke the arch_ble_ext_wakeup_on(), before that you will have to either setup a ke_timer or an external interrupt in order to wake up in a specific amount of time or via an external interrupt.

Thanks MT_dialog

RandyYu
Offline
Last seen:2年10个月前
加入:2015-01-28 08:49
1.My question is I don't know

1.My question is I don't know how to step into deep sleep mode and wake up by ke_timer.I feel the details dialog had provided is very messy.Do you have a example a deails can help me step by step to realize it
2.which function is ke_timer(can wake up device in deep mode) ?
3.I want send 10 times data ,after that I want it step into deep sleep mode.does your mean when I call arch_ble_ext_wakeup_on(),it will step into deep mode ?
4.if I want deep sleep,does external crystal 32MHZ must exist??

MT_dialog
Offline
Last seen:2个月3周前
Staff
加入:2015-06-08 11:34
嗨兰迪宇,

嗨兰迪宇,

1. You can do this via a kenrel timer as i ve indicated to your previous posthttp://support.dialog-seminiondiondiondiond.com/deep-sleep-mode..

2. There is no specific function in order to wake up from sleep via a kernel timer, just set a timer before going to sleep and start advertising at the timer handler.

3.你提到你想发送10个价值然后落在永久睡眠中,你不能在你连接的时候摔倒,你必须断开连接然后落在永久睡眠中。Arch_ble_ext_wakeup_on()在睡眠前使用,并且为了向您的系统声明他必须等待外部信号以唤醒。它在第12页的UM-B-006文档中描述的SDK3中相同的功能。

4.外部XTAL32振荡器仅在升压模式下强制,请在相关常见问题解答下面检查链接:

http://support.dialog-semiconductor.com/guide/faq-hardware-peripherals.

Thanks MT_dialog

RandyYu
Offline
Last seen:2年10个月前
加入:2015-01-28 08:49
2.在任何时候都有意思

2.指示您的意思任何时间调用回函数可以从深度睡眠模式唤醒设备?我在项目中使用了函数app_easy_timer,如果我不希望这个定时器处理程序唤醒设备。在睡觉前我取消它当
3.when use arch_ble_ext_wakeup_on() ,only external event can wake it up?I want ke_timer wake it up

MT_dialog
Offline
Last seen:2个月3周前
Staff
加入:2015-06-08 11:34
嗨兰迪宇,

嗨兰迪宇,

2. Yes any kernel timer callback can wake up your device from sleep mode, if you are sleeping and you dont want that specific timer handler to wake up your device you will have to cancel it.

3.如果您在通用睡眠前设置了内核计时器,您将从计时器唤醒,您不必使用ARCH_BLE_EXT_WAKEUP_ON()。

Thanks MT_dialog

RandyYu
Offline
Last seen:2年10个月前
加入:2015-01-28 08:49
my device can sleep and

my device can sleep and wakeup,there are some another questions
1.外设的状态(GPIO UART ADC ECT。),它们是否对应于重置后的状态?
2.If my device using sleep mode,can the watchdog used?They will be conflict?

MT_dialog
Offline
Last seen:2个月3周前
Staff
加入:2015-06-08 11:34
嗨兰迪宇,

嗨兰迪宇,

1. I dont get your question, what do you mean what is the status of the peripherals, when you are in sleep mode the peripherals are deactivated.

2. You can use the watchdog in sleep mode, its deactivated when your device is in sleep mode, but will be active when the devices exits sleep mode.

Thanks MT_dialog

RandyYu
Offline
Last seen:2年10个月前
加入:2015-01-28 08:49
1.I mean status is pull down

1.我的平均状态是拉下/向上,输入/输出,高电阻。
and when wakeup,need I reinitialize all of this?
我有一个问题,
第一季度
.I want P03 output high,when connected to master.
然后我坐了
GPIO_reservation(){
保留_GPIO(StBY,GPIO_PORT_0,GPIO_PIN_3,PID_GPIO);
...
}

void set_pad_function()
{
GPIO_ConfigurePin(GPIO_PORT_0,GPIO_PIN_3,OUTPUT,PID_GPIO,true);
...
}
user_on_init()
{
GPIO_CONFIGUREPIN(GPIO_PORT_0,GPIO_PIN_3,输出,PID_GPIO,FALSE); //设置输出
...
}
in
user_on_connection()
{
GPIO_ConfigurePin(GPIO_PORT_0,GPIO_PIN_3,OUTPUT,PID_GPIO,true);//when connected set high
...
}
user_before_sleep(void)
{
arch_set_extended_sleep();
GPIO_CONFIGUREPIN(GPIO_PORT_0,GPIO_PIN_3,输出,PID_GPIO,FALSE); //如果删除始终高,则为0.916V。
}
如果GPIO_CONFIGUREPIN(GPIO_PORT_0,GPIO_PIN_3,输出,PID_GPIO,FALSE)始终高p03始终高;删除
user_before_sleep(void),does it indicate that my device is not go to sleep state??
但是我已经测量了我的设备电流2.5μA,当发送通告时,电流约为100-200μA,连接电流
is 600-800μA。
Are these not sure already to sleep?If not how I can I make sure?In the Froums I had seen ,using the SmartSnippet to makesure.But I don;t konw how to use it,
它需要任何其他硬件吗?

what's wrong with it,please give me a help.
Q2:
我发现,我用jatg来调试一步一步,
sleep_mode = rwip_sleep(); in arch_main
the value of sleep_mode is always on mode_active.
because this sentence
if(check_sys_startup_period())
break; ///have a break here
ifind它总是在这里打破。
我的调试方法是否错误?或者这正常。

MT_dialog
Offline
Last seen:2个月3周前
Staff
加入:2015-06-08 11:34
嗨兰迪宇,

嗨兰迪宇,

Q1。当我说外围设备被取消激活时,这意味着您无法使用ADC的定时器等,就GPIO(无论您是否连接)时,当580才能休眠时,GPIO将锁存,以便保持其状态当你回来睡觉时。唤醒时,Periph_init再次运行并初始化原始状态的GPIO。因此,您必须在PeripH_Init函数中放置一个变量,该函数保存PIN睡眠前的状态,并且当Periph_Init()重新运行根据该变量设置GPIO时。

从我可以从您粘贴的代码中讲述,每次外设初始化运行时都会将引脚配置为真,因此如果您已连接,如果启用了延长睡眠,则PIN的连接是旋转的。智能片段需要Pro套件以便操作,并为确保设备睡觉的好方法是熟练的。

Q2。If you are in sleep mode you wont be able to debug the device since the debugger is detached, so you will have to disable sleep, if you disable sleep your device will be active all the time.

Thanks MT_dialog

RandyYu
Offline
Last seen:2年10个月前
加入:2015-01-28 08:49
第一季度:user_before_sleep() has

第一季度:
我想知道销电压,如果我使用万用表测量它,何时睡觉。它会在睡眠前保持电压
user_before_sleep() has set it low
Q2:Would not be able to execute WFI () before ?

MT_dialog
Offline
Last seen:2个月3周前
Staff
加入:2015-06-08 11:34
嗨兰迪宇,

嗨兰迪宇,

Q1。The reason for seen the pin low is explained in this posthttp://support.dialog-semicondiondiondum/my-gpio-cant-change-state-处于...

Q2。我认为你误解了the BLE and the sleep functionality, when you are advertising and your are connected the 580 keeps falling to sleep between the advertising events and connection events. The WFI() is the command that the 580 stucks and waits for a BLE interrupt (this interrupt will occur when its time for the next BLE event).

Thanks MT_dialog