Based on the example by majbthrd from https://github.com/majbthrd/stm32cdcuart
This code is ported and tested for the STM32F072CBT6 with two UASRTS: UART1 and UART3
Changes are in the GPIO and AFR registers. The source from the original project is imported into a Keil uVision 5 type project.
Enjoy!