完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好,我使用:-pic32mx795f512l-sst25vf016b-SPI波特率1MHz(我已经尝试过1-10MHz)-主模式增强缓冲-中断优先级1-子中断优先级0-8位数据宽度-空闲低边上升[link=mailto:-DRV_SST@%]-DRV_SST[/link]25闪存函数,我对SP的写入非常不一致我闪闪发光。每个200字节的错误大约是1个错误字节。我已经设置了一个比较函数来比较写入到SPI的字节和从SPI中读取的字节。这个错误率是当我写1000字节。当我减少写入的字节数时,错误增加(即,如果我发送20字节,每15字节有一个错误,如果我发送5000字节,每400字节有一个错误)。我说的大概是因为我的测试结果。我使用SST_25驱动程序函数提供的自动寻址写方法。我99%肯定写和不读的问题,因为我可以多次读取(我已经测试了大约15次)并且总是收到相同的结果(数据缓冲区中的相同字节)。有人有什么建议或想法,为什么我的沟通不是100%准确?我已将示波器连接到SPI的SCK和SDO线路上,噪声似乎最小/不相关。谢谢。
以上来自于百度翻译 以下为原文 Hello I am using: -pic32mx795f512l -sst25vf016b -SPI baud rate 1MHz (I have tried 1-10MHz) -Master mode -Enhanced buffer -Interrupt priority 1 -sub-Interrupt priority 0 -8-bit data width -Idle low edge rise [link=mailto:-DRV_SST@%]-DRV_SST[/link]25 flash functions I'm having very inconsistent writing to my SPI Flash. The error is approximately 1 wrong byte per 200 bytes. I have set up a compare function to compare the byte written to the SPI and read from the SPI. This error ratio is when I Write 1000 bytes. When I reduced the amount of bytes I write, the error increases ( i.e. if I send 20 bytes, there is 1 error every 15 bytes, if I send 5000 bytes there is one error every 400 bytes. I am saying APPROXIMATELY due to my testing results ). I am using the autoaddressincrement write approach offered by the SST_25 driver functions. I am 99% positive the problem is with write and not read because I can read multiple times ( i have tested around 15 times) and always receive the same results (same bytes in the databuffer). Anyone have any suggestions or ideas why my communication is not 100% accurate? I have hooked up the oscilloscope to the SCK and SDO lines of the SPI and the noise seems to be minimal/irrelevant. Thanks. |
|
相关推荐
9个回答
|
|
我意识到玩弄波特率会改变一切。我发现了一个很好的传输点。任何关于如何最大限度地保持一致性的提示仍然值得赞赏。
以上来自于百度翻译 以下为原文 I've realized that playing around with the baud rate changes everything. I have found the sweet spot where transmission is pretty good. Any tips on how to maximize consistency would still be appreciated thanks. |
|
|
|
甜点是什么?多少层PCB?从PIC到芯片的距离?SPI线上还有多少芯片?误差是随机的还是在某些地方。谁是SPI代码?
以上来自于百度翻译 以下为原文 What is the sweet spot? How many layer pcb? Distance from pic to chip? How many other chips on the spi lines? Are the errors random or in certain places. Who's spi code? |
|
|
|
在11兆赫,我可以写4096个字节到闪光灯相当一致,PCB有4层,4.5厘米之间的PIC和Flash,有一个RTC在同一SPI,错误是完全随机的,我使用SST25驱动代码从和谐封锁,阻断写入,和阻断酶,也SPI只工作时挂钩。示波器
以上来自于百度翻译 以下为原文 at 11 MHz I can write 4096 bytes to the Flash pretty consistently, the PCB has 4 layers, 4.5 cm between the PIC and Flash, there is an RTC on the same SPI, the errors are completely random, I am using SST25 driver code from harmony BlockRead, BlockWrite, and BlockErase, also SPI only works when hooked up to oscilloscope. |
|
|
|
什么版本的和声?MHC和和声版本匹配吗?
以上来自于百度翻译 以下为原文 What version of Harmony? Does the MHC and Harmony version match? |
|
|
|
和谐V2.01和MPLAB V3.50。我不确定这两个版本是否匹配,但它们是最新版本,尽管MPLAB V3.51现在已经过时了。
以上来自于百度翻译 以下为原文 Harmony V2.01 and MPLab V3.50. I'm not sure if those two versions match but they are the latest versions although MPLab V3.51 is out now I believe. |
|
|
|
我认为这是很重要的,可能会有助于提升。你能附加一个逻辑分析仪(或者在4个通道上的深范围跟踪)并捕获错误吗?
以上来自于百度翻译 以下为原文 I think this is significant, maybe pull ups would help. Can you attach a logic analyzer ( or deep scope trace on 4 channels ) and capture the error ? |
|
|
|
|
|
|
|
我已经在PCB上拉起来,也通过和谐设置。杰瑞我已经尝试了每一个边缘组合,但我已经把它设置成正确的边缘从规格表。我没有一个逻辑分析器,所以我不能捕捉特定的比特进行进一步的分析。
以上来自于百度翻译 以下为原文 I have pulls ups on the PCB and also set through harmony. Jerry I have tried every combination of edges, but I have it set to the correct edge from the spec sheet. I don't have a logic analyzer available to me, so I can't capture the specific bits for further analysis. |
|
|
|
嗨,我建议你断开SPI RTCC的连接,然后试着读/写到SPI flash上。
以上来自于百度翻译 以下为原文 Hi, I suggest you disconnect your SPI RTCC and just try read/writes to your SPI flash. Once this works you can add the RTCC and see if this causes the problem Regards |
|
|
|
只有小组成员才能发言,加入小组>>
5178 浏览 9 评论
2003 浏览 8 评论
1931 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3177 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2228 浏览 5 评论
737浏览 1评论
622浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
509浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
635浏览 0评论
533浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-26 10:58 , Processed in 1.504363 second(s), Total 92, Slave 75 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号