Introduction
Nucleo development board's st-link provides a virtual serial port. It connects the UART2.
This example uses the polling mode (without interrupt and DMA) of the UART to print infomation to a PC.
Created:2018-11-14 Last modified:2018-11-14
Nucleo development board's st-link provides a virtual serial port. It connects the UART2.
This example uses the polling mode (without interrupt and DMA) of the UART to print infomation to a PC.
uint8_t buffer[20] = "Hello, World!\n\r"; while(1) { counter = counter % 10; buffer[0] = '0' + (counter++); HAL_UART_Transmit(&huart2, buffer, 20, 1); HAL_Delay(200); }