完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
亲爱的各位,
我正在开发一种基于太阳能收集器的低功率信标。我想基于临时存储上可用的能量在慢速和快速广告之间动态切换。 在配置阶段,我为下面的参数定义了两个不同的值: CysLyDebug MyDeFieln.AdvPARAM-GT; CysLyDebug MyDeField.AdvPARAM-GT;AdvutvMax=ReValVILAST; 我以缓慢的方式开始广告 CyBLY-GAPSTART广告(CyBLYAL广告); 在每次使用BACAON传输结束时的运行时,我用这些命令估计存储器的容量: It16 ReSyADC=0U; ADCYVDDUVION WAKEUP(); ADCYVDDVungSistCurror(); ADCYVDDVISOL ISEDN转换(ADCYVDDVISOR WItiTA FORY结果); RESIADAD= ADCYVDDVIONGURGETRESULT16(0U); 然后,我定义了一个切割值,基于这个值,我想用一个简单的解决方法在慢和快之间进行切换: ISSHINIFASTHAD广告是一个初始化为假的全局值 如果(RESIADAD>ADCYCUT){ 如果(!)iSuiNi-FASTHAD广告){ CyBLY-GAPSTART广告(CyByLoad广告快速); IsIn In FASTHASTIVAL=TRUE; } }否则{ If(IsInNi-FASTHAD广告){ CyBLY-GAPSTART广告(CyBLYAL广告); IsIn In FASTHAL广告= FALSE; } } 完全不起作用。 有人能帮我找到解决的办法吗? 谢谢你的支持。 最好的问候 菲利波 以上来自于百度翻译 以下为原文 Dear all, I'm developping a low power beacon based on solar harvesting. I would like to dynamically switch between the SLOW and the FAST advertising based on the energy available on the temporary storage. I have defined two different value for the following parameter at the configuration phase: cyBle_discoveryModeInfo.advParam->advIntvMin = REGVAL_Slow; cyBle_discoveryModeInfo.advParam->advIntvMax = REGVAL_Fast; and I start the advertising in SLOW mode CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_SLOW); During the runtime at the end of every becaon transmission using the ADC_Sar i estimate the volatge of the storage with these commands: int16 res_ADC = 0u; ADC_VddConv_Wakeup(); ADC_VddConv_StartConvert(); ADC_VddConv_IsEndConversion(ADC_VddConv_WAIT_FOR_RESULT); res_ADC = ADC_VddConv_GetResult16(0u); Then I have defined a cut value and based on this value I would like to swtich among SLOW and FAST with a simple solution like this: is_in_fast_advertisement is a global value initialized to false if(res_ADC>ADC_Cut){ if(!is_in_fast_advertisement){ CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_FAST); is_in_fast_advertisement=true; } }else{ if(is_in_fast_advertisement){ CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_SLOW); is_in_fast_advertisement=false; } } Unortunately is not working. Anyone can hep me on find a solutions for this? Thanks in advances for the support. Best regards Filippo |
|
相关推荐
5个回答
|
|
嗨,菲利波。
在主动广告模式中,Avutvmin和Advutvax的值是最小值和最大值。 尝试设置AdvtVMIN=ReValVixFAST和AdvtVxMax=ReValVaLAST + 10,然后在启动慢速广告之前启动快速广告和Advutvmin=ReValValx慢和AdvtVimax=ReValValx慢+ 10。 当做, 达维德 以上来自于百度翻译 以下为原文 Hi Filippo. The values of advIntvMin and advIntvMax are the minimum and maximum values in the active advertising mode. Try to set advIntvMin = REGVAL_Fast and advIntvMax = REGVAL_Fast+10 before starting the fast advertising and advIntvMin = REGVAL_Slow and advIntvMax = REGVAL_Slow+10 before starting the slow one. Regards, Davide |
|
|
|
你应该设置:
CysLyDebug MyDeFieln.AdvPARAM-GT; CysLyDebug MyDeFieln.AdvPARAM-GT; 当你想要慢广告的时候,这个: CysLyDebug MyDeField.AdvPARAM-GT;Advutvmin=ReValVILAST; CysLyDebug MyDeField.AdvPARAM-GT;AdvutvMax=ReValVILAST; 当你想要快速的广告。 广告的Min和马克斯间隔为包内发送的定时设置了随机分布的范围。将它们设置为相同将迫使严格的时序增加EMI的机会,但出于测试目的,它将简化材料。 此外,在切换广告模式之前,您可能必须停止广告; 首先调用CyByLyGAPPultAuthSuffMeNe(),然后调用CyByLyGAPSTART广告(CyByLyAdvultSuxLoad);或者CyByLyGppStistAdvad(CyByLuffAddiSuxIdFAST);取决于您切换到的模式。 以上来自于百度翻译 以下为原文 You should be setting: cyBle_discoveryModeInfo.advParam->advIntvMin = REGVAL_Slow; cyBle_discoveryModeInfo.advParam->advIntvMax = REGVAL_Slow; when you want slow advertising, and this: cyBle_discoveryModeInfo.advParam->advIntvMin = REGVAL_Fast; cyBle_discoveryModeInfo.advParam->advIntvMax = REGVAL_Fast; when you want fast advertising. The Min and Max intervals for advertising set the range of random distribution for timing that the packets will transmit within. Setting them to be the same will force strict timing increasing the chance of EMI, but for testing purposes it will simplify stuff. Also, you may have to be stopping advertisement before switching advertisement modes; Call CyBle_GappStopAdvertisement() first, then call the CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_SLOW); or CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_FAST); depending on which mode you are switching to. |
|
|
|
非常感谢您的详细答复。 因此,我误解了Advutvax和Advutvmin的方法,再次感谢我澄清了这一点。 在用我在这里描述的解决方案之前,我已经采纳了你向我提出建议的解决方案。 事实上,我将参数设置为相同的值,并且基于ADC转换的结果,我执行以下步骤: 1)我调用函数CyByLyGAPStPultEngEngEnter() 2)我正在寻找CyByLyEvtGAPPuffEngultEnStestSturt停止信号 3)我将根据ADC结果更新广告间隔。 4)重新启动广告模式 但是这个过程对我的应用需要太多的能量。 有可能改变广告间隔而不重新启动广告系统吗? 以上来自于百度翻译 以下为原文 Thank you so much for your detailed reply. So I have misunderstood the means of advIntvMax and advIntvMin thank again for have clarified me this point. Before go head with the solutions that I have described here I have adopted the solution that you where proposing to me. In fact I was setting the parameter to the same value and based on the results of ADC conversion I do the following steps: 1) I call the function CyBle_GappStopAdvertisement() 2) I looking for the signal CYBLE_EVT_GAPP_ADVERTISEMENT_START_STOP 3) I will update accordingly with the ADC results the advertiing interval 4) I restart the advertising mode but this procedure require too much energy for my application. There is a possibility of changing the advertising interval without restart the advertising system? |
|
|
|
你好, 如果不重新启动广告,就无法更改ADV间隔。为了获得低功耗,你可以参考下面的应用笔记。 HTTP://www. CyPress .COM/DICONTION/APPLION-NOTES/AN92584设计:低功耗和可估计的电池寿命 当做, - Madhu Sudhan 以上来自于百度翻译 以下为原文 Hi, The Adv intervals cannot be changed without restarting the advertisement. In order to obtain low power, you can refer to the below app note. http://www.cypress.com/documentation/application-notes/an92584-designing-low-power-and-estimating-battery-life-ble Regards, -Madhu Sudhan |
|
|
|
你可以把设备放入深度休眠模式,设备仍然在广告。这将允许CPU和外围设备的非常低的功耗(如果配置正确),同时仍然支持来自BLE设备的广告。 以上来自于百度翻译 以下为原文 You can put the device into deep-sleep mode with the device still advertising. This will allow very low power consumption of the CPU and peripherals (if configured properly), while still supporting advertising from the BLE device. |
|
|
|
只有小组成员才能发言,加入小组>>
752个成员聚集在这个小组
加入小组2069 浏览 1 评论
1826 浏览 1 评论
3634 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1760 浏览 6 评论
1510 浏览 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 13:02 , Processed in 1.036066 second(s), Total 85, Slave 68 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号