I am working on a project where I have to send characters such as 0x00, 0x01, 0x09, 0x13 and such to a display device. It wasn't doing what I expect, so I connected the UART output to a terminal to suss out why.
I can send a string (thousands of times it now seems) of "This is UART 1\n\r" through this UART with no problem. When I try to send a string consisting of non-readable characters: 01 09 00 00 64 6C ix converted to 0964 6c 0d 0a. First of all, what happened to the 01? That's the command code. The two zeros are dropped as well, and those are parameters. And where did the 0a 0d come from? I thought HAL_UART_Transmit took a UART handle, a string pointer, a count, and a timeout. No mention of filtering and adding characters.
Is there another function I should be using? A different mode?