# STM32 LPUART1
**Board using:STM32L496xx**
## spec reaing
LPUART communication is defined in spec using PG7 and PG8.


## MX Cube settings



## Code in main.c
```
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "stdio.h"
#define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f)
/* USER CODE END Includes */
/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
PUTCHAR_PROTOTYPE
{
HAL_UART_Transmit(&hlpuart1, (uint8_t *)&ch, 1, 0xFFFF);
return ch;
}
/* USER CODE END 0 */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
printf("Hello\n\r");
HAL_Delay(500);
}
/* USER CODE END 3 */
```
## Press start debug session and RST
Set Microlib, Need Microlib to support printf


## Finished

## Reference

https://www.youtube.com/watch?v=jZkLCzlPylY&list=PLYgGtiVoYLPdGLtOJ2Sci0ewZCfBLdabN&index=4