Tool/software: Code Composer Studio
Question 1:
When I use the UART_Params structure to initialize the serial port, it is found that the serial port can not work normally when the data bit dataLength is set to 5 and 6, and the output information is a random code. When using 7 and 8 data bits, the output information of the serial port is correct. What's the reason? thanks!
Question 2:
Stop bits and check bits are set correctly, can be used.
But there is a strange phenomenon, for example, the setting stop bit is 1, the parity bit is Odd, if the serial port configuration is the same as the settings, then the use is OK.
If the checkbit error uses even, sends a piece of data, switches back to the Odd, and sends the message to find the serial port dead (other normal: GPIO, timers, including Bluetooth signals, etc.)
What is the reason for this?
Initialization function: UART_Params_init (¶ms);
Baud rate setting: params.baudRate = 115200;
Data bit setting: params.dataLength = UART_LEN_8;
Stop bit settings: params.stopBits = UART_STOP_ONE;
Check bit setting: params.parityType = UART_PAR_EVEN;