title: STM32: Implementing UART in DMA mode
body: <p>I am trying to implement UART in DMA mode to transmit a simple string every time a push button is pressed.</p>
  
  <p>So I have used CubeMX to generate the code and I have configured UART2 TX DMA in normal (not circular) mode and also no FIFO and no burst.</p>
  
  <p>Whenever I run the code in debugging mode, I see the first time I attemp to send the string, it works ok and sends the string, but inside the DMA IRQ handler, it calls TxHalfCpltCallback and not TxCpltCallback and also UART gState will remain in BUSY mode so I can't use it to transmit no more string.</p>
  
  <p>My Question is why it calls TxHalfCpltCallback and not TxCpltCallback? and how should I handle it (because HAL reference says it waits for sending the second half of buffer! what?)</p>
  
  <p>And also, would sending the next half of data relase the gState of UART?</p>
  
  <p>I would like to ask someone to give us an example of configuring UART in a project.</p>