2024-07-26 02:31 PM
I acquired some code for an STM32F3 that performs LIN communication over USART1. Previously the code used DMA channels for both memory-to-peripheral and peripheral-to-memory transfers to/from USART1, but it had some problems that required restructuring the code so that USART1 instead interrupts on RXNE and the received bytes are read from the peripheral in the ISR. Currently LIN transmissions are still driven by a memory-to-peripheral DMA channel.
However, since I made that change I have not been able to get any LIN messages to transmit from USART1. So my question is: can USART1 simultaneously support DMA for the memory-to-peripheral direction (transmit) and non-DMA (RXNE interrupt) for the peripheral-to-memory direction (receive)? I was unable to find a definitive answer in the STM32F3 data sheet so I wanted to check that this should be possible before I dig into debugging.
Solved! Go to Solution.
2024-07-26 02:58 PM
Of course right after I posted I figured it out. I accidentally had the code to enable the DMA TX request and to enable the DMA commented out and after adding them back, LIN RX and TX worked properly.
2024-07-26 02:58 PM
Of course right after I posted I figured it out. I accidentally had the code to enable the DMA TX request and to enable the DMA commented out and after adding them back, LIN RX and TX worked properly.