May 2020
Intermediate to advanced
496 pages
13h 54m
English
The uartPrintOutTask function that is responsible for printing out data received by USART2 is a bit more complex in this example. This example is also capable of comparing the received data against an expected length, as well as some rudimentary error detection:
void uartPrintOutTask( void* NotUsed){ uint8_t rxData[20]; uint8_t expectedLen = 16; memset((void*)rxData, 0, 20); STM_UartInit(USART2, 9600, NULL, NULL);