完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我正在寻找一个专家建议如何解码2个异步脉冲流与PSOC4 BLE。
我有2个信号,有一个奇怪的专有协议。最大脉冲长度为200μs,最小脉冲长度为10μs,需要用至少1,5μs的分辨率测量脉冲长度。 现在我正在寻找最有效的利用内部资源,以最小的CPU时间来解决这个问题(CPU需要处理BLE通信,这不应该干扰测量)。 什么是“最佳”计时器配置? 以上来自于百度翻译 以下为原文 I am looking for an expert advice on how to decode 2 asyncronous pulse streams with a PSOC4 BLE. I have 2 signals with a strange proprietary protocol. The maximum pulse length is 200µs and the minimal pulse length 10µs. I need to measure the pulse length with at least 1,5µs resoluton. Now I am looking at the most efficient use of internal resources to archeive this with the minimul amount of CPU time possible (the CPU needs to handle the BLE communication and this shouldn't interfere with the measurements). What would be the "best" timer configuration for this? |
|
相关推荐
8个回答
|
|
作为一个定时器的TCPWM设置是正确的答案。
1MHz的输入时钟将给出1U分辨率。 可以使用下降沿捕获。 下降沿中断…和一个ISR来重置时间并读取捕获。 下一个问题是你将如何处理不同的脉冲。他们来得多快啊。 以上来自于百度翻译 以下为原文 A TCPWM setup as a Timer is the right answer. A 1MHz input clock will give you 1us resolution. You can use a falling edge capture. A falling edge interrupt ... and an ISR to reset the time and read the capture. The next question will be what/how you will do with the different pulses... and how fast they come. |
|
|
|
问题是如何以有效的方式处理2异步数据流。信号是由一系列4到10脉冲,比有一个停顿约500µS. 我应该使用不同的定时器每一个或一个8bit定时器吗?最好是有一个“自由奔跑”或重置定时器在每抓?我能使用DMA外围设备吗? 以上来自于百度翻译 以下为原文 The question is how to handle the 2 asyncronous data streams in an efficient way. The signal consists of a sequence of 4 to 10 pulses and than there is a pause of approximately 500µs. Should I use differtent timer for each one or a single 8Bit timer? Is it better to have a "free running" timer or to reset it after every catch? Can I use the DMA Peripheral? |
|
|
|
abc1763613206 发表于 2018-9-27 14:44 因为在脉冲测量之后复位计时器是需要的动作,使用DMA会变得相当复杂(如果可能的话)。 我会尝试使用一个连接如下所示。 因此,当500μs到期时,设置定时器周期将给你一个中断,否则捕获中断将获得0.5的分辨率的信号宽度。 鲍勃 以上来自于百度翻译 以下为原文 Because resetting the timer after pulse measure is a required action using DMA will get rather complicated (if possible at all). I would try using a connection as shown below. Setting the timer period accordingly will give you an interrupt when the 500µs expire, otherwise the capture interrupt will get you the signal width with 0.5 µs resolution. Bob |
|
|
|
ncmza 发表于 2018-9-27 14:58 这就像你之前编程过PSoC一样。 虽然我不知道为什么你在2MHz的时钟,而不是1,因为他只需要1.5美的精度? 以上来自于百度翻译 以下为原文 It is almost like you have programmed a PSoC before. Though Im not sure why you clock it at 2mhz instead of 1 given that he only needed 1.5us accuracy? |
|
|
|
虽然我不知道为什么你在2MHz的时钟,而不是1,因为他只需要1.5美的精度? 因为我能; 鲍勃 以上来自于百度翻译 以下为原文 Though Im not sure why you clock it at 2mhz instead of 1 given that he only needed 1.5us accuracy? Because I can ;-) Bob |
|
|
|
六羟甲基三聚氰胺六甲醚。。。。 幂~~*c*v^ 2*f -) 以上来自于百度翻译 以下为原文 Hmmm.... power ~= ~C*V^2*F :-) |
|
|
|
幂=kg*m/s所有度量。使用盎司、英里和AM/PM的时间一定很难表达… 鲍勃 以上来自于百度翻译 以下为原文 Power = kg * m² / s³ for all that are metric. Must be quite difficult to express using ounces, miles and am/pm times... BOB |
|
|
|
链接相关的时钟功率分析线程:电路-功耗如何随处理器频率在一个典型的计算机?物理堆栈… 权力:以特定方式做某事或行为的能力,尤指作为一个教员或素质 P 以上来自于百度翻译 以下为原文 Link with related clock power analysis thread: electric circuits - How does power consumption vary with the processor frequency in a typical computer? - Physics Stack … Power: the ability to do something or act in a particular way, especially as a faculty or quality;P |
|
|
|
只有小组成员才能发言,加入小组>>
715个成员聚集在这个小组
加入小组1896 浏览 1 评论
1651 浏览 1 评论
3401 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1567 浏览 6 评论
1379 浏览 1 评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
180浏览 2评论
179浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
318浏览 2评论
344浏览 1评论
58浏览 1评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-4-20 05:23 , Processed in 0.702636 second(s), Total 78, Slave 66 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号