Possible HAL F429 UART TX Bug
- July 31, 2017
- 3 replies
- 4590 views
Hi, I am working on my project which requires to send some data over UART.
I have F429ZI Nucleo board with a UART2 configured (see uart2_config image). The UART2 has Interrupts enabled so I can use the HAL_UART_Transmit_IT function.
I am passing an array of uint8_t values. Only 4 bytes. The bytes are getting transmitted via the TX pin as expected, but only 7 bits per byte are transmitted. (see tx_8_bits_no_parity image).
So I got into the F429xx datasheet (
) and on page 994 the Table 146 clearly states that when the bits M (length = 8bits) and PCE (parity = None) are reset, the UART frame will be: Start Bit, 8 data bits, Stop Bit.Why is MCU sending only 7 bits when no parity is enabled? So I decided to enable parity in CubeMX and set it to Even.
However, the parity bit just takes up one of the 8 bits, making the data only 6 bits! (see tx_8_bits_even_parity image).
The same table 146, clearly states that the MCU should be sending 7 Data bits and not 6.
How can this be? Am I missing something? I am only trying to send 8 bits of data (0x00 - 0xFF) without parity.
Any advise would be appreciated.
Thanks.
#uart #bug #f4 #cube-mx #hal