1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我们有一个定制的嵌入式板上有一个GPS上的UART1(9600波特),一个细胞调制解调器上的UART3(9600),和调试输出端口上UART2(115200)。我使用全部3个端口完全中断驱动。我观察到UART1经常在UART3上发送传输的时候得到帧错误。如果禁用UART3上的单元格调制解调器的使用,则不会看到帧错误。如果我不给电池调制解调器加电,但仍然在UART3上进行传输,我再次看到帧错误。检查实际波特率(25MHz时钟),两者都应该运行在9645 bPS(0.46%以内)。我尝试使用BRGH=1来获得更精确的波特率,但是似乎没有任何效果(就像在DOCS中的那些公式完全错误),即使调试端口在BRGH=1时也有严重的波特率失配。UART的RX采样定时?有人能提出任何理由,为什么我会得到从GPS接收串行数据的框架错误(应该有非常精确的定时)?(UBLX MAX M8)
以上来自于百度翻译 以下为原文 We have a custom embedded board that has a GPS on UART1 (9600 baud), a cell modem on UART3 (9600), and a debug output port on UART2 (115200). I use all 3 ports fully interrupt driven. I have observed that UART1 frequently gets framing errors around the time that a transmission is sent on UART3. If I disable the use of the cell modem on UART3, I do not see framing errors. If I don't power up the cell modem, but still do transmissions on UART3, I again see the framing errors. Checking the actual baud rates (25MHz clock), both should be running at 9645bps (within 0.46%). I tried using BRGH=1 to get an even more accurate baud rate, but then nothing seems to work (it's like those formulas in the docs are completely wrong -- even the debug port appears to have a severe baud rate mismatch when BRGH=1). Is there anything in this MCU that I could be doing that could skew the UART's RX sampling timing? Can anyone suggest any reasons why I would get framing errors receiving serial data from a GPS (which should have very accurate timing)? (uBlox MAX M8) |
|
相关推荐
4个回答
|
|
看起来很像“电问题”-串音?或一些-特别是很难找到-软件错误眨眼:
以上来自于百度翻译 以下为原文 Looks a lot like "electrical problems" - crosstalk ? Or some - especially hard to find - software bug wink: |
|
|
|
在一个串行端口上缺少接地连接?
以上来自于百度翻译 以下为原文 Missing ground connection on one of the serial ports? |
|
|
|
嗨,你检查了3个UART错误的DSPIC33 EP512MU810不影响您的程序吗?(请参阅ErrasaSeTeT)。如何检测帧错误?你写了一个错误处理程序吗?你在设计中使用25MHz XTAL吗?当做
以上来自于百度翻译 以下为原文 Hi, Did you check the 3 UART erratas of dsPIC33EP512MU810 do not affect your program ? (see erratasheet). How do you detect the frame error ? Die you write an error handler ? Are you using a 25MHz XTAL in your design ? Regards |
|
|
|
谢谢你的回复。我会和我们的电子学人员核对一下串扰的可能性。“所有的软件都有bug”,所以还是有可能的。我正在考虑不间断地传输,看看它是否改变了什么。关于勘误表,我没有看到影响我的UART勘误表:16:我使用UTXISEL=0,所以不应用17:我不认为这些设备中的任何一个使用BRK,所以不应用18:我离开UART启用A。时间不多,所以我也没有看到任何可能影响波特率产生或导致时钟偏移的勘误表。我一直在使用错误处理程序中断,但是它调用了与RX中断相同的代码(这也处理了错误)。我正在尝试一个单独的错误中断,看看是否有帮助。我们有一个12MHz的TCXO在我们的设计,所以我们可以使用USB,这是通过一个缓冲器(NC7WZ125)到DSPIC时钟输入引脚63(OSC1)。THE为25MHz。我对PLL设置相当确定,因为其他非常严格的定时(即,汇编代码到时钟输出数据)在系统中运行良好。
以上来自于百度翻译 以下为原文 Thanks for your responses. I'll check with our electronics guys about the possibility of crosstalk or bad grounds. "All software has bugs" so that's still a possibility. I'm considering trying transmits without interrupts to see if it changes anything. Regarding the errata, I see nothing about the UART errata that affects me: 16: I'm using UTXISEL=0, so does not apply 17: I don't think any of these devices use BRK, so does not apply 18: I am leaving the UARTs enabled all the time, so does not apply I also see nothing in the errata about anything that could affect baud rate generation or cause clock skew. I have been using an error handler interrupt, but it was calling the same code as the RX interrupt (which also handled errors). I'm trying a separate error interrupt to see if that helps. We have a 12MHz TCXO in our design so we can use USB, which is going through a buffer (NC7WZ125) to the dsPIC clock input on pin 63 (OSC1). Tcy is 25MHz. I'm fairly sure about the PLL settings because other very strict timings (ie, assembly code to clock out data) in the system are working well. |
|
|
|
只有小组成员才能发言,加入小组>>
5238 浏览 9 评论
2028 浏览 8 评论
1950 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3204 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2253 浏览 5 评论
776浏览 1评论
665浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
594浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
675浏览 0评论
575浏览 0评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-22 23:56 , Processed in 1.169386 second(s), Total 54, Slave 48 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号