title: Transmit commands in ASCII format STM32
body: <p>I'm using STM32 discovery board to communicate to a device that takes ASCII commands. </p>
  
  <p>I use <code>HAL_UART_TRANSMIT_IT</code> to send data, that works fine.</p>
  
  <p>I want to send ASCII command XM3 to the device. When I use virtual port programs as realterm, I just click on ascii and put the baudrate, databitc etc etc and when I type in XM3 and click on +CR it send the command and it works fine, if CR is not included it doesent work.</p>
  
  <p>When I try to do that from my MCU I use this code and it does not work, any ideas how to send ASCII commands in C via serial port?</p>
  
  <pre><code>char txD[3]="XM3";
  __HAL_UART_ENABLE_IT(&amp;huart1, UART_IT_TC);
  HAL_UART_Transmit_IT(&amp;huart1, (uint8_t *)txD ,3);
  </code></pre>
  
  <p>When I send this to realterm it shows XM3 but when I send this to the device nothing happens.</p>
  
  <p>I need to know how I send XM3 and a CR to the device. </p>