9 bit UART and DMA
Hiya,
I'm using the UART in 9 bit mode, with the 9th bit being used as an address indication.
I have a version of this working well with 16 bit DMA transfers. Ideally though I want to use 8 bit DMA (byte wide) as all my data is packed for byte wide transfers, and I don't really care about the 9th bit except as an address indicator.
I managed to get this sort of working with byte wide DMA receiving and populating TDR on the transmitter side manually with:
UARTD6.usart->TDR = (uint16_t)addr;
(stuff)
UARTD6.usart->TDR = (uint8_t)val;
UARTD6.usart->TDR = (uint8_t)val;
(etc)
This works ok.
I would like to replace the sending of the byte wide values with a DMA transfer, but I can't get DMA to transmit correctly though, in that I see incomplete transfers or garbage on the receiving side.
Is this idea achievable? Or is my thinking flawed in trying to send byte wide DMA to the 9 bit UART?
Thanks very much
#usart #dma-usart #9-bit #dma