Stm32 hal uart transmit example. That's the size in bytes you want to send.