SBUS: USART_WordLength
Opened this issue · 1 comments
plusk01 commented
SBUS is 8E2:
- 100000 baud
- 1 start bit + 8 data bits + 1 parity bit (even) + 2 stop bits
- inverted
This is being set here:
case MODE_8E2:
USART_InitStruct.USART_WordLength = USART_WordLength_8b;
USART_InitStruct.USART_Parity = USART_Parity_Even;
USART_InitStruct.USART_StopBits = USART_StopBits_2;
break;
I'm looking at the very vague F4 (and F3) documentation, and Figure 297 seems to imply that the word length should actually be USART_WordLength_9b
because of the parity bit. The only reason I came across is this is because I couldn't get valid SBUS data in airdamon_f3
until I used 9 bit word length.
I don't have an F4 to try this on, and I'm assuming that SBUS has been working for you just fine -- so really, I'm just curious if you have any thoughts about why 8b
works for you, but 9b
works for me...
superjax commented
Haha, well, it seems to be working... That is strange. I never looked into that.