2024-11-28 02:11 PM - last edited on 2024-11-29 07:45 AM by SofLit
I am supposed to be receiving 8-bit data with even parity. The blocks are defined with a header of 'F0', this is S.Bus data if anyone knows that that is. I setup a simple program that just does receive data. I get data but nowhere does it show an 'F0'. Am I supposed to use 'LL_USART_ReceiveData8' or 'LL_USART_ReceiveData9' to read this data? Is the parity supposed to be read with the data and discarded? It's not at all clear how the parity is handled.
Solved! Go to Solution.
2024-12-04 02:15 AM
Try to transmit and observe the signal you've transmitted.
JW
2024-12-04 12:44 PM
You are correct. I had the pin inverted at first, then re-read the documention, and set it to non-inverted. You try to make sense of this:
Bit 16 RXINV: RX pin active level inversion
This bit is set and cleared by software.
0: RX pin signal works using the standard logic levels (VDD =1/idle, Gnd=0/mark)
1: RX pin signal values are inverted (VDD =0/mark, Gnd=1/idle).
Anyway, I misread this documentation. The 9-bit data is correct with parity. I don't know what you mean by "2 parity" bits. The format is 8-bit data, parity and 2 stop bits.
It works now, at least I get the "0F" where I expect it. I need to check the number if IDLEs I got.
Thanks for sticking with me though this.
2024-12-04 12:48 PM
Thanks for stick with me though this. The data was inverted. I misread the documentation. It's confusing as to what the USART expects.
Bit 16 RXINV: RX pin active level inversion
This bit is set and cleared by software.
0: RX pin signal works using the standard logic levels (VDD =1/idle, Gnd=0/mark)
1: RX pin signal values are inverted (VDD =0/mark, Gnd=1/idle).