STM32 USART transmit and receive messages

USART stands for Universal Synchronous Asynchronous Receiver Transmitter. Sometimes it is referred as UART where synchronous communication is not possible. https://paypal.me/OneTimeYTubeSupport... Enabling USART and receive or send message is simple in Keil for STM32 when we know how. This video exactly explaining one of many ways to do that. Near end of the video I am talking about problems if you are using .h (header) files. Many times Keil complains about "sharing violation", which is actually their bug in the program. Please update your Keil with new version 5.27 here: http://www2.keil.com/mdk5/527pre I recommend to use HTerm console, which is more advanced than Putty or Serial monitor on Arduino IDE. You can find it here: http://www.der-hammer.info/terminal/ (it is on German, use Google translate on the page) vsprintf() functions and how to type format, you may find here: http://www.cplusplus.com/reference/cs... printf() and vsprintf() are almost the same - first one getting string, but second one uses array[] which we want actually. Then from this array we send byte by byte to the data register (USART1_DR) on STM32 MCU. Then waiting for USART_SR_TXE flag which tell us that data register transferred byte to the shift register and sent out. Now it is ready for next byte. In the case of RX, it is bit different - we first wait for receiving flag USART_SR_RXNE to be set, then we should transfer byte from data register (USART1_DR) to our array[]. Note that RX and TX uses the same register for transmitting and receiving data. For that reason, I am using just one array[], not two. Maybe there is option to simultaneously receive while transmitting data, but for now we will use one or another, not both at the same time. All codes and more you may find here on my web page: http://wp.me/p7jxwp-mV ~~~~~~~~~~~~~-~~~~~~~~~~~~~~