完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
IMADEA与SPI主机的简单电路,接着是D触发器。请参阅附件图像。
当按下一个按钮时,SPIX会传送字节:0xAA。 我注意到DFF似乎在时钟的下降沿上锁定D输入,这不是我所期望的。 我经常使用DFF在PSoC设计中,它们通常闩在上升沿上。 请注意,我运行在只有5赫兹SPI时钟能够观看LED上的开发工具包。 这里怎么了? 问候,汤米 JPG 84.8 K 以上来自于百度翻译 以下为原文 I made a simple circuit with a SPI master followed by a D-flip-flop. Please see attached image. When I press a button the SPI will transmit the byte: 0xAA I noticed that the DFF seems to latch the D input on the falling edge of the clock, which was not what I expected. I've used DFF's often in PSoC design and they normally latch on the rising edge. Please note I'm running at only 5 Hz SPI clock to be able watch the LEDs on the dev kit. What's wrong here? Regards, Tommy
|
|
相关推荐
7个回答
|
|
|
范围没有倒置在其他2个通道上?
范围触发正确设置? 在D CLK上设置和保持OK? D CLK上没有明显的故障? 只是想大声说话… 设置范围在时钟上运行Runt并输入以查看是否捕获任何东西。 问候,Dana。 以上来自于百度翻译 以下为原文 Scope not inverted on other 2 channels ? Scope trigger setup properly ? Setup and hold on D clk OK ? No observable glitches on D clk ? Just thinking outloud..... Set scope up to trigger on runt on clock and input to see if you capture anything. Regards, Dana. |
|
|
|
|
|
DFF应该真正锁定上升沿。我相信这一点,但寻找其他原因。(即使当它锁定上升沿时,由于SPI在同一时刻改变数据,我希望看到一些故障。)所以这个错误最有可能发生在别的地方。
在编译项目时你有任何警告吗?SPI是如何配置的(模式0)? 以上来自于百度翻译 以下为原文 The DFF should really latch on rising edge. I would no doubt this, but look for other reasons. (Even when it would latch on rising edge, since SPI changes the data at the same moment, I would expect to see some glitches there). So the error is most likely somewhere else. Do you get any warnings when compiling the project? How is SPI configured (mode 0)? |
|
|
|
|
|
Dana:
作用域在任何通道上都不反转。 SPI SCLK输出上升沿的范围触发。 没有观察到毛刺。 HLI: 没有关于编译的严重警告,只是时钟精度警告。 SPI配置为CPHA=0,CPOL=0。 我同意你的观点,因为D输入在下降时钟的变化,它似乎更像DFF是锁在时钟的上升沿ASIT应该,但等待下一个下降时钟边缘之前,它呈现的价值Q。 汤米 以上来自于百度翻译 以下为原文 Dana: Scope is not inverted on any channels. Scope triggers on rising edge of SPI sclk ouput. No glitches observed. hli: No serious warnings on compilation, just clock accuracy warnings. SPI is configured CPHA=0 and CPOL=0 I agree with you that since the D input changes at the falling clock, it seems more like the DFF is latching on the rising edge of the clock as it should but waits for the next falling clock edge before it presents the value on Q. Tommy |
|
|
|
|
|
但是它是DFF的输出,它随着上升沿而改变(或者应该改变)——这就是DFF的整个点…
今晚我会尝试复制这个问题,也许我看到了一些东西。在那之前,您可能需要删除关于时钟精度的警告——只需配置时钟,这样就可以从晶体或IMO得到一个较慢的时钟(例如,从IMO中导出3MHz的主时钟,然后将其除以16)。否则,它选择ILO作为源,它不准确,也不同步到其他内部时钟。 以上来自于百度翻译 以下为原文 But it is the output of the DFF which changes (or should change) with the rising edge - thats the whole point of the DFF... I will try to replicate this issue this evening, maybe I see something. Until then you might want to remove the warning about the clock accuracy - just configure the clocks so you have a slower one available derived from a crystal or the IMO (e.g. derive the master clock from IMO which gives 3MHz, and then divide it by 16). Otherwise it selects the ILO as source, which not as accurate, and which is also not synchronized to the other internal clocks. |
|
|
|
|
|
好的,我测试过了。得到了同样的行为-即使从SPMIGIL CLK得到更高的SPI时钟。
但我也有一个解决方案:你需要同步的DFF时钟输入(我测试同步到BuSyCLK),它的工作原理。从逻辑分析仪看到这个结果(顶部是用于触发的SS信号,然后是CLK、MOSI和Q): 因此,DFF似乎有一个问题,所以它需要一个同步时钟。也许你可以打开一个支持案例。 以上来自于百度翻译 以下为原文 OK, I tested it. Got the same behavior - even with a higher SPI clock derived from MASTER_CLK. But I also have a solution for you: you need to sync the DFF clock input (I tested with syncing to BUS_CLK), the it works. See this result from the logic analyzer (the top is the SS signal used for triggering, then CLK, MOSI, and Q): So there seems to be an issue with the DFF so that it needs a synchronized clock. Maybe you can open a support case. |
|
|
|
|
|
HLI:
非常感谢你的帮助和时间。你说得对。它与同步时钟一起工作。 看来,DFFACK输入只用于系统时钟,或至少同步信号。 问候,汤米 以上来自于百度翻译 以下为原文 hli: Thanks a lot for your help and time. You're right. It works with a sync'ed clock. It seems that DFF clock inputs are for system clocks only, or at least sync'ed signals. Regards, Tommy |
|
|
|
|
|
DFF数据表只说明系统时钟的可用性。它也通过PLD块中的宏单元直接实现(和合成)。所以不应该依赖系统时钟。我怀疑你在如何合成你的示意图时碰到了一个BIG——SPI主控组件和DFF之间的组合可能出错了。
以上来自于百度翻译 以下为原文 The DFF data sheet says nothing about being usable only with system clocks. Its also implemented (and synthesized) directly via the MacroCells in the PLD blocks. So there shouldn't be a dependency on system clocks. I suspect you hit a buig with respect to how your schematic is synthesized - something in the combination between the SPI master component and the DFF might went wrong. |
|
|
|
|
只有小组成员才能发言,加入小组>>
788个成员聚集在这个小组
加入小组cyUSB3014一直显示2.1,不能到3.0情况,谁遇到过
7367 浏览 0 评论
2486 浏览 1 评论
2178 浏览 1 评论
4045 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
2089 浏览 6 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
7866浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
6430浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
759浏览 2评论
730浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
8278浏览 2评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-14 10:14 , Processed in 0.967371 second(s), Total 84, Slave 67 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
2260