Serial Driver Cannot Handle 9-bits?

Discussions and support about ChibiOS/HAL, the MCU Hardware Abstraction Layer.
avrhack
Posts: 140
Joined: Tue Dec 24, 2013 1:42 pm
Has thanked: 17 times
Been thanked: 3 times

Serial Driver Cannot Handle 9-bits?

Postby avrhack » Sat Jun 10, 2017 3:42 pm

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.

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Serial Driver Cannot Handle 9-bits?

Postby Giovanni » Sat Jun 10, 2017 5:05 pm

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

avrhack
Posts: 140
Joined: Tue Dec 24, 2013 1:42 pm
Has thanked: 17 times
Been thanked: 3 times

Re: Serial Driver Cannot Handle 9-bits?

Postby avrhack » Sat Jun 10, 2017 6:47 pm

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!


Return to “ChibiOS/HAL”

Who is online

Users browsing this forum: No registered users and 4 guests