2015-01-22 10:46 AM
Now that I've got my USART working with my DMA to do two 8-bit transfers per 16-bit word, I have encountered another problem: incorrect data. I know the mantra for serial comms when data is wrong is baud rate, baud rate, baud rate, but this one's a bit different: since I'm running in synchronous, my receiver isn't expecting any particular baud rate, so it's not a % error issue.
I send six bytes (3 16-bit words) via synchronous USART to my ASIC. My ASIC is expecting a SPI-type transfer, so it's happy with any speed up to 30MHz. I'm running the STM32F427 at 168MHz, and dial the baud rate down to something reasonable when I set up the USART. The issue is that the SECOND byte (out of the six), and ONLY the second byte, is wrong 90% of the time. I've scoped it, and sometimes it's shifted, sometimes a high is too long, sometimes too short, etc. About 10% of the time it gets it right. I can post my code if need be, but since 5/6 bytes transfer fine, I'm not so sure that would help. I have tried dialing the baud rate to 21MHz, 10.5MHz, 5.25MHz, and even tried hard coding the ''standard'' RS-232 values all the way down to 9600bps. No change either way. Does this sound like some sort of reflection issue on the transmission line? #usart-stm32-baud2015-01-22 10:42 PM
Post a minimal but complete compilable code exhibiting the problem, together with the captured waveforms.
JW