We have been running a software UART through the McBSP on a C6711, based partly on the example code provided by TI. This setup uses the EDMA to send UART-format data to the McBSP for transmission. I ran into a problem with the EDMA doing this, and found a workaround. TI doesn't believe it's doing what I see it doing however, so I'm mentioning it here in case anyone else is having the same problem. The default state of the DX line is supposed to be logic-high when you aren't transmitting. I was seeing my transmission go out, and then the DX line would go low and stay low. If the McBSP finishes sending the last word it was given and it hasn't been given a new word, it will send that last word over and over until you give it a new word or it is disabled. With UART-formatted data the last word is always logic-high, so this should be OK. According to the manual, you configure the EDMA for the number of words you want it to send to the McBSP, and it sends them as fast as the McBSP will take them. What I found was that for transmit (but not receive) the EDMA was sending one word more than I told it to. I proved this by setting the EDMA to send 11 words, and then setting the 12th word to a pattern that nothing else had. Sure enough, my transmission went out normally, and then the DX line was driven continuously with the pattern I had put in the 12th word. So my fix is this: for transmit, configure the EDMA to send NUM-1 words instead of NUM. But don't do this for receive. Hope this helps somebody, Dan Eyer |
C6711 McBSP and EDMA FYI
Started by ●September 16, 2002