A minimal UART setup can be achieved by setting up the Starter Project. This section will introduce some advanced concepts like interrupt and DMA transfer.
1. Interrupt
2. DMA
Note: sometimes CUBEIDE will put the DMAinit() code after the UART_init code in the autogenerated section. If this happens, UART will not work!
We need to manually move the DMA_init() piece to the top.