Page 1 of 1

Serial Driver Cannot Handle 9-bits?

Posted: Sat Jun 10, 2017 3:42 pm
by avrhack
I have an application which needs 9 data bits on the USART. From what I can see, the ChibiOS serial driver cannot be used for this as it explicitly uses 8 bit queues?

Could someone confirm I have to use the USART driver if I want to send/receive all 9 bits? if so that's a real pain and would be good if it's considered for a change in the future.

Re: Serial Driver Cannot Handle 9-bits?

Posted: Sat Jun 10, 2017 5:05 pm
by Giovanni
Hi,

The driver assumes queues of bytes, it is not possible to change it. You should look into the UART driver instead, that one could be enhanced.

Giovanni

Re: Serial Driver Cannot Handle 9-bits?

Posted: Sat Jun 10, 2017 6:47 pm
by avrhack
Yeah I've changed the code over to the UART driver - it was much easier than I thought, thanks to the good examples in the testhal folders. Thanks Giovanni!