完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好,
我们想知道是否需要在睡觉前检查BLE电池组是否处于开启状态? 我们在示例项目中看到: 如果(CythBulyGETStEATE()= = CythBuryStisteon) { CythySypMyDeSt入睡(CythySypMmithaWiTi For中断); } 我们已经测试了有无IF语句的两种情况,它们返回相同的结果: (1)当BLE不是广告,没有设备连接时,系统总是无法进入深度睡眠(总是返回失败)。 (2)当BLE是广告时,系统进入深度睡眠每秒深度睡眠尝试/呼叫(返回失败,然后成功) (3)当设备连接时,系统总是成功进入深度睡眠。 (4)设备断开/广告超时后,系统总是无法进入深度休眠直到广告重新启动。 我们对在进入深度睡眠之前检查BLE堆栈的理由感到好奇,并且在上述情况(1)和(4)中,为什么系统不能进入深度睡眠。在设备断开/广告超时之后,内部也发生了什么,因为我们注意到系统没有试图进入深度睡眠的时间框架(尽管我们在一个while循环中调用了深度睡眠API),然后系统总是无法在其上深度睡眠。 最好的, 史蒂夫 以上来自于百度翻译 以下为原文 Hi there, We are wondering if it's necessary to check that the BLE stack is on before going to Deep Sleep? We see in example projects: if(Cy_BLE_GetState() == CY_BLE_STATE_ON) { Cy_SysPm_DeepSleep(CY_SYSPM_WAIT_FOR_INTERRUPT); } We have tested for both cases with and without the if-statement which returns the same result: (1) While ble is not advertising and no device connected, the system always fails to enter deep sleep (always returns failure) (2) While ble is advertising, the system enters deep sleep every second deep sleep attempt/call (returns failure then success) (3) While device connected, the system always succeeds to enter deep sleep (4) After device disconnection/advertisement timeout, the system always fails to enter deep sleep until advertisement restarts We are curious the reasoning for checking the BLE stack before entering deep sleep and why the system isn't able to go to deep sleep in cases (1) and (4) as described above. What is also happening internally after device disconnection/advertisement timeout, because we notice there is a time frame where the system doesn't attempt to enter deep sleep (though we have the deep sleep API called in a while loop) and then the system always fails to deep sleep thereon after. Best, Steve |
|
相关推荐
3个回答
|
|
如果在单核心上实现BLE,BLE中断可以唤醒设备从深度睡眠。你能给我指一个确切的例子吗?
如果您已经在双核上实现了BLE,请参考KBA:将核心设置为深度休眠模式,同时在PSoC®6上启用BLE功能-KBA223 谢谢, 希马 以上来自于百度翻译 以下为原文 In case of BLE implemented on single core the BLE interrupts can wake the device from deep sleep. Can you point me to the exact example project? In case you have implemented BLE on dual core please refer to the KBA: Setting Cores to Deep Sleep Mode while BLE Function is Enabled on PSoC® 6 – KBA223291 Thanks, Hima |
|
|
|
60user67 发表于 2018-10-12 13:50 我们提到的例子项目AN219528 - PSoC(R)6 MCU低功耗模式和功率降低技术,使用双核。但我们只使用单核实现,不确定是否使用单核和双核之间存在深度差异。然而,你提供的链接回答了我们的很多问题。 但是我们仍然不确定为什么(1)中描述的行为仍然在发生。在情况(1)中,当BLE没有广告/连接时,祝福中断永远不会触发,所以我们认为系统应该仍然能够成功地进入深度睡眠。然而,在我们按下开关重新启动广告之后,系统可以再次成功地进入深度睡眠。 谢谢, 史蒂夫 以上来自于百度翻译 以下为原文 We were referring to the example project AN219528 - PSoC(R) 6 MCU Low-Power Modes and Power Reduction Techniques which uses dual cores. But we are only implementing with single core and weren't sure if there were differences between deep sleep using single and dual core. However the link you provided answers a lot of our questions. But we're still unsure why the behavior described in (1) is occurring still. In case (1), the bless interrupt is never triggering when ble is not advertising/connected so we are thinking the system should still be able to successfully enter deep sleep. However after we restart advertisement by a switch press, the system can enter deep sleep successfully again. Thanks, Steve |
|
|
|
Emily1225 发表于 2018-10-12 13:58 我们已经解决了(1)中所描述的问题。结果是,我们只调用了一个回调函数中的CythBuriPraseSeVScript(),它没有被调用,因为如果蓝牙没有广告,没有设备连接,则祝福中断不会触发。事实证明,即使没有广告/设备连接,也应该调用CyBLyPrExeSeVScript()。 这就引出了我们的后续问题:在祝福中断旁边是否存在另一个内部中断?我们注意到,当蓝牙不是广告,没有设备连接时,系统成功地进入睡眠状态。但是,经过一段时间后,它醒来,并要求调用CYBLYPROCESSEVSEN()调用API,才能成功恢复睡眠。我们知道这不是祝福中断唤醒系统,因为我们已经注册了一个回调函数到祝福中断,该函数没有被调用。 我们附上了我们目前正在测试的代码,如果它能帮助我们更好地理解上面所描述的内容。排除和包含第102行,我们在这里评论“在这里”看到UART中打印出来的不同结果。在排除,系统成功进入深睡眠开始后但未在其上。 最好的, 史蒂夫 深度睡眠模式 11.7兆字节 以上来自于百度翻译 以下为原文 We've fixed the issue described in (1). In turns out because we were only calling Cy_BLE_ProcessEvents() in a callback function attached to the bless interrupt, the API was never getting called because the bless interrupt doesn't trigger if bluetooth is not advertising and no device is connected. It turns out Cy_BLE_ProcessEvents() should still be called even if there is no advertisement/device connection. That leads to our follow up question: is there another internal interrupt beside the bless interrupt? We notice that when bluetooth is not advertising and no device is connected, the system successfully goes to sleep. However, after a little while it wakes up and requires API call of Cy_BLE_ProcessEvents() before it can successfully return to sleep. We know it's not the bless interrupt waking up the system since we've registered a callback function to the bless interrupt and that function does not get called. We've attached the code that we are currently testing if it helps to get a better context of what we've described above. Exclude and include line 102 where we've commented "Here" to see the different results printed out in UART. On exclusion, the system successfully goes into deep sleep initially but fails thereon after. Best, Steve
|
|
|
|
只有小组成员才能发言,加入小组>>
752个成员聚集在这个小组
加入小组2069 浏览 1 评论
1824 浏览 1 评论
3633 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1760 浏览 6 评论
1509 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
507浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
357浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
410浏览 2评论
357浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
854浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-22 06:00 , Processed in 0.868435 second(s), Total 53, Slave 46 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号