本帖最后由 ColeYao 于 2021-1-25 09:31 编辑
如图,因为不小心把串口收发端搞反了,而stm32F407不支持收发端软件切换,且115200bps使用软件模拟串口误码率太高不能满足使用要求,故使用DMA+定时器方式模拟串口。现在的问题是模拟串口发送时,偶尔会出错(加不同的前导字节,出错的数据不一样,但前导字节固定后,每次出错都是一样的情况,且出错的几率不固定,有时候几率高,有时候几率低),如附件所示,加前导字节用处不大,有谁知道是啥原因,该如何解决吗?
因为发不了附件,就直接贴stm32F407发送后PC端收到的数据了!
Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!嬰?
祦Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!Hello,I am Cole!嬰?
祦Cole!Hello,I am Cole!Hello,I am Cole!
|
|