STM32L412 USART transmit using DMA drops characters, must use HALFWORD alignment
I set up DMA for a USART transmit operation with an ST32L412. Settings are 115200 baud, 8 data bits, no parity. I thought everything was working until I noticed the third character in all my outbound data not showing up. It turns out the default BYTE memory alignment from the CUBE is the problem. BYTE alignment doesn't work with the UART. You have to use HALFWORD alignment for both the "PeriphDataAlignment" and "MemDataAlignment" fields in the UART MSP initialization routine. You can select this in the CUBE interface. You also have to copy your outbound string into an array of 16-bit (short int) and only use the lower 8 bits. Anyone else notice this? Is this documented anywhere?
rgds,
Gary
