2015-01-06 11:19 AM
I've got a project with three ASICs that expect 16-bit words to be received via SPI, transferred via DMA . Unfortunately, due to a pin conflict, I only have SPIs 1 and 3 available. So. I was thinking about trying to use a USART in synchronous mode. Obviously, I'm limited to 8 bits (or 9). But is there a way to ''fool'' the DMA into completing two 8-bit transfers from the USART of my 16-bit word?
2015-01-07 11:43 AM
You may find this discussion regarding TIM triggered DMA interesting:
It should be possible to drive a USART similarly.2015-01-07 01:16 PM
The DMA can handle multiple bytes, half-words (16-bit), and words (32-bit).
Somehow I don't think the synchronous serial is likely to get the results you want, you'd have to experiment. You could presumably send two back to back bytes, but not sure how you'd separate 16-bit pairs.2015-01-07 01:56 PM
In synchronous mode the USART is essentially a shift register so you can shift in/out any number of bits along with the clock. Even if there's a gap between bytes it's transparent to SPI because data is triggered on a clock edge, not time dependent. This assumes you don't have to switch the SPI chip select after every word (I seem to recall either TI or Motorola had an SPI interface like that).
Where you might have a problem is clocking data in and out on the right edge of the USART clock. If your ASICs use bidirectional transfers this can be a real problem. Not sure how you can control clock edge in USART synch mode. Jack Peacock2015-01-22 10:33 AM
What I was completely forgetting: my ASICs on the other end of the USART are just 16-bit shift registers at the front end, too, so I just shift data one byte at a time, and let the clock move the data into place.
Thanks for the help guys!