完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好,
我们有蓝牙配置为单核M0+蓝牙控制器和主机。我们想知道,在下面的表中,什么是被视为祝福模式(广告,连接,传输等)?具体来说,我们可以把核心放在深度睡眠,而蓝牙广告呢?或者只有睡眠模式是可能的?我们使用逻辑分析仪来观察CythySypMyDeSoLeLeP()和CythySypMySeLeP()的成功/不成功转换。对于CythySypMyLoSe[(),波形显示成功成功的不成功周期,而蓝牙是广告,而CythySypMyDeSLeLeP()显示了一个成功的循环,接着是多次失败。 至于当蓝牙设备连接时,我们同样感到奇怪。如果一个设备被连接,但是没有数据被发送/接收,我们能将祝福放置到睡眠模式吗?或者只有当一个设备被连接时,祝福才能处于主动模式吗? 最好的, 史蒂夫 以上来自于百度翻译 以下为原文 Hi there, We have Bluetooth configured to single core m0+ for both Bluetooth controller and host. We are wondering, in reference to the table below, what is considered active mode for BLESS (advertising, connected, transmission, etc.)? Specifically, can we put the core to deep sleep while bluetooth is advertising? Or is only sleep mode possible? We are using a logic analyzer to observe the successful/unsuccessful transitions of Cy_SysPm_DeepSleep() and Cy_SysPm_Sleep(). For Cy_SysPm_Sleep(), the waveforms show successful-successful-unsuccessful cycles while bluetooth is advertising, while Cy_SysPm_DeepSleep() shows cycles of one success followed by multiple unsuccesses. As for when a bluetooth device is connected, we are wondering the same. If a device is connected but no data is being transmitted/received, could we put the BLESS to sleep mode? Or can the BLESS only be in active mode so long as a device is connected? Best, Steve |
|
相关推荐
16个回答
|
|
你好, 没问题,我们一直在做其他的任务。 是的,我们仍然面临蓝牙连接的问题,非常感谢您的帮助。 最好的, 史蒂夫 以上来自于百度翻译 以下为原文 Hi msur, No problem, we have been working on other tasks meanwhile. And yes, we are still facing the issue with Bluetooth connectivity and would greatly appreciate your help Best, Steve |
|
|
|
史提夫, 我看了一下这个项目,并添加了您提供的修改的(;)循环。如果您还记得我前面提供的示例,您将需要调用过程服务器直到广告开始。基本上,在CythBuryHalf.It.c文件中的修复是不完整的,没有堆栈库中的另一个修复——我们只使用修复的一半。完整修复将很快作为PDL 3.0.4(一个或两个星期)的一部分。 这就是我的(循环)循环的样子(我相信标志名称是不言自明的),并且我的广告在每一次超时后都开始良好。 (;) { 如果(过程)iStaskon)ISStaveAdvut完备) { Cyle Burr进程(); 过程错误; } 如果(!)CythySypMyCM0ISLoWPOWER() { CythySypMsEndoLoPultMeod(); } CythEnEnLyBulsBelsStisteTyBelStest= CyBulyStaskGutBelestStand(); 如果(BelsSt==CythBulyBelsStisteAc能能能生)BelsSt==CythBulyBelsStAtEyEx Eoo稳) { CythEnthySypMsStutsSutht APIREST=CythySypMyS入睡(CythySypMmithWaITY-FuxId中断); 如果(APIREST)!CysySypMm成功 { CygGPIOSET(dBu00xPoT,dBy00nnUm);/ /不工作 } 其他的 { CygGPIO-CLR(dBu00PoT,dBu00nnUm);/ /工作 } } 其他的 { CythEnthySypMsStutsSutht APIREST=CysySypMyDeSt入睡(CythySypMmithWaiTi For中断); 如果(APIREST)!CysySypMm成功 { CygGPIOSET(dBu11PoT,dBu11nNm);/ /不工作 } 其他的 { CygGPIO-CLR(dBu11PoT,dBu11nNm);/ /工作 } } } 所以请添加那个代码,看看它是否修复了这个问题。 当做, Meenakshi Sundaram R 以上来自于百度翻译 以下为原文 Steve, I took a look at the project and added the modified for(;;) loop you provided. If you remember the example I provided earlier, you will need to call ProcessEvents till Advertisement starts. Basically the fix in the cy_ble_hal_int.c file is incomplete without another fix in the stack library - we are using only one half of the fix. The complete fix will be soon out as part of PDL 3.0.4 (in a week or two). This is how my for(;;) loop looks like (I believe the flag names are self explanatory ) and my advertisement starts fine after every timeout. for(;;) { if(processEvents || (!isStackOn) || (!isStartAdvComplete)) { Cy_BLE_ProcessEvents(); processEvents = false; } if(!Cy_SysPm_Cm0IsLowPower()) { Cy_SysPm_EnterLowPowerMode(); } cy_en_ble_bless_state_t bleSsState = Cy_BLE_StackGetBleSsState(); if(bleSsState == CY_BLE_BLESS_STATE_ACTIVE || bleSsState == CY_BLE_BLESS_STATE_ECO_STABLE) { cy_en_syspm_status_t apiResult = Cy_SysPm_Sleep(CY_SYSPM_WAIT_FOR_INTERRUPT); if(apiResult != CY_SYSPM_SUCCESS) { Cy_GPIO_Set(DB_0_PORT,DB_0_NUM); // Doesn't work } else { Cy_GPIO_Clr(DB_0_PORT,DB_0_NUM); // Work } } else { cy_en_syspm_status_t apiResult = Cy_SysPm_DeepSleep(CY_SYSPM_WAIT_FOR_INTERRUPT); if(apiResult != CY_SYSPM_SUCCESS) { Cy_GPIO_Set(DB_1_PORT,DB_1_NUM); // Doesn't work } else { Cy_GPIO_Clr(DB_1_PORT,DB_1_NUM); // Work } } } So please add that code and see if that fixes the issue. Regards, Meenakshi Sundaram R |
|
|
|
史提夫,
祝福不能进入低功耗模式,这是广告(而广播主动做TX),监听连接请求(无线电主动做RX)和连接层(通常连接发送/接收的每个连接的间隔期)。 不得不说的是,一旦你开始堆和栈的广告开始,自动将负责管理广播的功率模式。这一cy_ble_start API注册回调和回调函数使系统不进入深度睡眠而广播活动(通过调用时返回cy_syspm_fail cy_syspm_deepsleep API)。注意,当设备不允许深度睡眠当广播活跃时期,它允许睡。然而,在某些情况下,收音机需要CPU以及(一些处理)-通常中断或cy_ble_processevents API。 无论如何,你不必担心cy_syspm_deepsleep API调用,会自动把设备深睡眠时,收音机是成功进入低功耗模式。 当做, Meenakshi Sundaram R 以上来自于百度翻译 以下为原文 Steve, The BLESS cannot enter low power mode while it is advertising (while the radio is active doing Tx), listening for connection requests (radio active doing Rx) and making connection pings (usual conn Tx/Rx every connection interval period). Having said that, once you start the stack and advertisement starts, the stack automatically takes care of managing the radio's power modes. The Cy_BLE_Start API registers DeepSleep callbacks and those callbacks makes sure the system does not enter deep sleep while the radio is active (by returning CY_SYSPM_FAIL when calling Cy_SysPm_DeepSleep API). Note that while the device is not allowed to deep sleep during the period when radio is active, it is allowed to sleep. However, there are cases when the radio requires CPU as well (for some processing) - usually interrupts or Cy_BLE_ProcessEvents API. Anyway, you do not have to worry about calling Cy_SysPm_DeepSleep, the API will automatically put the device to deep sleep when the radio is successfully put into low power mode. Regards, Meenakshi Sundaram R |
|
|
|
你好,
谢谢,清理了很多东西。 我们很好奇收音机是否放在低功耗模式内部?还是要把它进入低功耗模式,通过调用cy_syspm_enterlowpowermode()?我们也注意到,我们能够使CPU进入深度睡眠时,设备连接。收音机是无效时,数据不转移但连接到设备? 以上来自于百度翻译 以下为原文 Hi msur, Thank you, that cleared up a lot of things. We are curious if the radio gets put into low power mode internally? or do we have to put it into low power mode by calling Cy_SysPm_EnterLowPowerMode()? We also notice that we are able to put the cpu into deep sleep when a device is connected. Is the radio inactive when data is not transferring but connected to the device? |
|
|
|
斯图尔特233 发表于 2018-9-7 18:17 你好,史提夫, 您不需要为此显式调用任何API。呼叫CythySypMySalm或DeepSleep将自动检查收音机的电源模式,并使设备进入睡眠/深度睡眠。当非激活时,堆栈自动将设备置于低功耗模式。 CythySypMyEntLoopPotoMeAPI激活各种块(线性调节器、主动引用等)的低功耗模式。这使得进一步节省功率,但降低性能的成本。例如,您的BOD电路将在正常模式下与100 mV/s相比,电压斜坡速率为10 mV/s。 希望这有帮助。 当做, Meenakshi Sundaram R 以上来自于百度翻译 以下为原文 Hello Steve, You do not need to call any APIs explicitly for this. The call to Cy_SysPm_Sleep or DeepSleep will automatically check radio's power mode and put the device to sleep/deep sleep. The stack automatically puts the device to low power mode when not active The Cy_SysPm_EnterLowPowerMode API activates low power modes for various blocks (Linear regulator, active references etc.). This enables further power savings but the cost of reduced performance. For instance, your BOD circuits will function for a voltage ramp rate of 10 mV/s compared to 100 mV/s in normal mode. Hope this helps. Regards, Meenakshi Sundaram R |
|
|
|
Emily1225 发表于 2018-9-7 18:32 Msur 谢谢你的澄清! 作为后续,我们注意到当设备通过蓝牙连接时,CPU失败并成功进入深度休眠模式。我们认为它与当前的祝福状态有关,如下面的图像中所引用的。在某些情况下,状态CybLyBulsBysStaseEngEngEclipse只允许深度睡眠。有没有办法确定CPU何时能进入深度休眠模式? 以上来自于百度翻译 以下为原文 Msur, Thank you for the clarification! As a follow up, we notice that when a device is connected via Bluetooth the cpu fails and successfully enters deep sleep mode. We think it has to do with the current bless state as referenced in the image below. It seems that the state CY_BLE_BLESS_STATE_EVENT_CLOSE only allows deep sleep in some scenarios. Is there a way to check for certain for when the cpu can be put to deep sleep mode? |
|
|
|
斯图尔特233 发表于 2018-9-7 18:39 你好,史提夫, 到目前为止,CyBuleBysListStisteEnviaCHILL状态是返回一个成功的深度睡眠回调最接近的状态。由于“CythBulyStAccCultLPM”API可能需要一些时间来将堆栈放置到低功耗模式,所以您需要允许CysBurySosiLeLePress回调以确保在调用CythySypMyDeSt入睡之后设备进入深度休眠状态。我建议你这样做,而不是尝试其他逻辑-因为它可能会变得复杂,当你开始使用双核模式 当做, Meenakshi Sundaram R 以上来自于百度翻译 以下为原文 Hello Steve, As of now, the CY_BLE_BLESS_STATE_EVENT_CLOSE state is the closest you can get to returning a successful DeepSleep callback. Since the "Cy_BLE_StackEnterLPM" API might take some time to put the stack to low power mode, you will need to allow the Cy_BLE_DeepSleepCallback to ensure the device enters deep sleep after a call to Cy_SysPm_DeepSleep. I would recommend you do use it that way rather than trying out other logic - as it can get complicated when you start using dual-core mode Regards, Meenakshi Sundaram R |
|
|
|
Emily1225 发表于 2018-9-7 18:52 Msur 谢谢您的及时回复,我们非常感谢!我们应该注意到,我们只是暂时使用单核——这仍然是可以实现的吗? 最好的, 史蒂夫 以上来自于百度翻译 以下为原文 Msur, Thanks for the prompt reply, we really appreciate it! We should note that we are only using single core the for time being - would this still be achievable? Best, Steve |
|
|
|
它是一个“是”和“没有”史提夫,单核的机会更好,但控制器和堆栈代码做的操作比简单的寄存器写操作要多,将祝福置于低功耗模式,所以你必须遵守它。 你面临的问题是什么?让我在这方面尽力帮助 以上来自于百度翻译 以下为原文 It is a yes and no Steve the chances are better with single core but still the controller and stack code does more operations than just a simple register write to put the BLESS to low power mode so you will have to abide by it. What is the issue you are facing? Let me try to help in that regard |
|
|
|
Emily1225 发表于 2018-9-7 19:16 嗯,我们正在寻找降低我们的设备的整体功耗。大量的时间,我们的设备将在蓝牙可发现/广告模式,所以我们认为,我们可以把设备在广告之前深度睡眠在PSoC 4。以前在PSoC 4中,在每一个广告间隔中,设备会通过祝福中断来处理任何事件,然后回到深度睡眠,并在下一个广告间隔醒来。PSOC 6仍然可以实现吗? 最好的, 史蒂夫 以上来自于百度翻译 以下为原文 Well, we are looking to reduce the overall power consumption of our device. A large amount of the time, our device will be in bluetooth discoverable/advertising mode, so we thought we could put the device to deep sleep during advertising as before in psoc 4. Previously in psoc 4, at every advertising interval the device would wake by the bless interrupt to process any events and then go back to deep sleep, and wake at the next advertising interval. Is this still achievable with psoc 6? Best, Steve |
|
|
|
斯图尔特233 发表于 2018-9-7 19:32 是的,这是完全可能的,实现在PSoC六更好。你可以试试看时间,该装置是在深度睡眠中的PSoC 6和PSoC 4相同的轮廓。从用户的观点的主要区别是在P4你需要手动做enterlpm,而P6堆栈自动(而背景)做广告时进入LPM RX/TX 以上来自于百度翻译 以下为原文 Yes, that is perfectly possible and is implemented much better in PSoC 6. You can probably try and see the time for which the device is in deep sleep for the same BLE profile in both PSoC 6 and PSoC 4. The main difference from a user point is - in P4 you need to do the EnterLPM manually, whereas is P6 the stack automatically (rather in background) enters LPM when done doing advertising Rx/Tx. |
|
|
|
Emily1225 发表于 2018-9-7 19:50 你好, CythySypMyDeSLIPEVER()在蓝牙广告发布时总是返回CythySpMyFor是正常行为吗?我们认为如果祝福能够进入深度睡眠,那么在那个时期,CPU也应该能够进入深度睡眠。 最好的, 史蒂夫 以上来自于百度翻译 以下为原文 Hi msur, Is it normal behavior that Cy_SysPm_DeepSleep() always returns CY_SYSPM_FAIL while bluetooth is advertising? We are thinking that if the Bless is able to go to deep sleep, then during that time period the cpu should also be able to enter deep sleep. Best, Steve |
|
|
|
斯图尔特233 发表于 2018-9-7 20:05 它只在无线电正在做TX/RX(通常取决于ADV数据的情况下,我们是100s)时返回失败。您是否一直看到API返回失败? 如果是,那么您可以检查WCO是否启用并正在采购LFCLK?检查你是否没有使用ALT HF(BLE ECO)用于FLL/PLL(然后时钟你的HFCLK)。 确保在组件中也启用了下面的复选框。 当做, Meenakshi Sundaram R 以上来自于百度翻译 以下为原文 It returns fail only when the radio is doing Tx/Rx (which is typically few 100s of us, depending on the Adv data). Are you seeing the API return fail all the time? If yes, then can you check if WCO is enabled and is sourcing LFCLK? And check if you are not using Alt HF (BLE ECO) for FLL/PLL (which then clocks your HFCLKs). Make sure you have enabled the below check box as well in the component - Regards, Meenakshi Sundaram R |
|
|
|
Emily1225 发表于 2018-9-7 20:24 你好, 我们已经找到了我们正在寻找的解决方案!在我们在蓝牙设备连接之前只检查CythBuyStAdgEdBLeStestEnter(),但结果证明,当蓝牙进行广告时,同样的逻辑也是有效的。谢谢你的帮助! 最好的, 史蒂夫 以上来自于百度翻译 以下为原文 Hi msur, We have found the solution we were looking for! Before we were only checking Cy_BLE_StackGetBleSsState() while a bluetooth device was connected, but it turns out that the same logic also works while bluetooth is advertising. Thank you for your help! Best, Steve |
|
|
|
Emily1225 发表于 2018-9-7 20:24 你好, 我们遇到了一个未知的问题,以前没有考虑过。我们正在经历不同的结果与修改cy_ble_hal_int。C在这个论坛的帖子的连接建议停止后的马克斯数BLE连接”时代。与修改,当蓝牙设备连接,然后断开,广告未能第一广告超时后重启。但没有任何修改的文件(常规项目建设),有连接问题,蓝牙设备只能连接其他连接请求(尽管广告重启好)。下面是我们当前的低功耗代码段。我们认为这可能是一个问题的时候,cy_ble_stackgetblessstate() = = cy_ble_bless_state_event_close和成功进入深睡眠,因为当我们进入睡眠模式,而不是普通的CPU,不发生问题。 (;) { 如果(!)CythySypMyCM0ISLoWPOWER() { CythySypMsEndoLoPultMeod(); } cy_en_ble_bless_state_t blessstate = cy_ble_stackgetblessstate(); 如果(blessstate = = cy_ble_bless_state_active | | blessstate = = cy_ble_bless_state_eco_stable) { cy_en_syspm_status_t apiresult = cy_syspm_sleep(cy_syspm_wait_for_interrupt); 如果(APIREST)!CysySypMm成功 { CygGPIO-IVI(dBu00PoT,dBy00nnUm);/ /不工作 } 其他的 { CygGPIO-IVI(dBu11PoT,dBu11nNm);/ /工作 } } 其他的 { cy_en_syspm_status_t apiresult = cy_syspm_deepsleep(cy_syspm_wait_for_interrupt); 如果(APIREST)!CysySypMm成功 { CygGPIO-IVI(dB22x端口,db22nNUm);/ /不工作 } 其他的 { CygGPIO-IVI(DbE33PoT,Bd33nNUm);/ /工作 } } } 以上来自于百度翻译 以下为原文 Hi msur, We've run into an unknown problem that was not accounted for before. We are experiencing different results with modifications to cy_ble_hal_int.c as suggested in this forum post Ble connection stops working after 'Max num. of ble connections' times. With the modification, when a bluetooth device connects then disconnects, advertising fails to restart after the first advertising timeout. But without any modifications to the file (regular project build), there are connection issues where the bluetooth device can only connect every other connection request (though advertising restarts fine). Below is our current low power code segment. We think it may be an issue when Cy_BLE_StackGetBleSsState() == CY_BLE_BLESS_STATE_EVENT_CLOSE and unsuccessfully enters deep sleep, because when we have the cpu enter regular sleep mode instead, the problem does not occur. for(;;) { if(!Cy_SysPm_Cm0IsLowPower()) { Cy_SysPm_EnterLowPowerMode(); } cy_en_ble_bless_state_t bleSsState = Cy_BLE_StackGetBleSsState(); if(bleSsState == CY_BLE_BLESS_STATE_ACTIVE || bleSsState == CY_BLE_BLESS_STATE_ECO_STABLE) { cy_en_syspm_status_t apiResult = Cy_SysPm_Sleep(CY_SYSPM_WAIT_FOR_INTERRUPT); if(apiResult != CY_SYSPM_SUCCESS) { Cy_GPIO_Inv(DB_0_PORT,DB_0_NUM); // Doesn't work } else { Cy_GPIO_Inv(DB_1_PORT,DB_1_NUM); // Work } } else { cy_en_syspm_status_t apiResult = Cy_SysPm_DeepSleep(CY_SYSPM_WAIT_FOR_INTERRUPT); if(apiResult != CY_SYSPM_SUCCESS) { Cy_GPIO_Inv(DB_2_PORT,DB_2_NUM); // Doesn't work } else { Cy_GPIO_Inv(DB_3_PORT,DB_3_NUM); // Work } } } |
|
|
|
Emily1225 发表于 2018-9-7 20:53 你好,史提夫, 真的很抱歉耽搁了很长时间——我已经离开我的办公桌,在过去的一个月里忙得不可开交。你还面临这个问题,还是已经解决了? 如果还没有解决的话,我再看一看。如果解决了,请发布您的解决方案供他人查看。 当做, Meenakshi Sundaram R 以上来自于百度翻译 以下为原文 Hello Steve, Really sorry for a long delay - I had been away from my desk and bit busy for the past month. Are you still facing this issue or have you been able to resolve it? I will take a look again, if it is not resolved yet. If resolved, do post your solution for others to look at Regards, Meenakshi Sundaram R |
|
|
|
只有小组成员才能发言,加入小组>>
752个成员聚集在这个小组
加入小组2071 浏览 1 评论
1827 浏览 1 评论
3639 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1761 浏览 6 评论
1513 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
511浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
361浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
410浏览 2评论
357浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
858浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-25 08:00 , Processed in 1.364369 second(s), Total 107, Slave 91 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号