2024-03-15 07:29 AM
I am using the Nucleo-64 STM32L476 evaluation board and am connecting via the (USB) debug port. This connects to USART2. However, when I send 7 bit serial (from the PC) it appears to arrive as 8 bit serial (USART2). Does the USB to Serial converter in the debug port only support 8 bit serial?
2024-03-15 08:59 AM
Good question, not sure
Show the configuration of ALL the uarts/serial ports in the chain here.
You're likely going to get the data as 8-bit bytes, if you've enabled parity that's included in the data-bit budget on STM32, and you'll need to strip it from the high-order bit of bytes in received data packets.
The output UART on the ST-LINK's STM32F1 should be a very close proxy of the settings you made on the PC. On the L4, it will be whatever you select there.
Why is 7-bit important? Forty years in, this seems atypical..
2024-03-15 09:21 AM
@Tesla DeLorean wrote:Good question, not sure
Indeed - it's not mentioned in the User Manual.
@Tesla DeLorean wrote:Why is 7-bit important? Forty years in, this seems atypical..
+1
@DOrch.1 if it is important, maybe test with separate USB-to-UART ?
2024-03-19 02:00 AM
I am doing a quick port of some old code the STM32. The code uses an old protocol based on 7 bit serial. If I set the USART2 to 8 bit the comms work whether I set the PC to 7 bit or 8 bit. If I set the USART to 7 bit the comms don't work whether I set the PC to either 7 or 8 bit.
This not a major issue since I am sure the final hardware will work. But this is the second limitation in the debug port that I have found. I just wanted to confirm that this was a limitation and not a mistake on my part.