STM32F4xx and UART7/8

Use this forum for requesting small changes in ChibiOS. Large changes should be discussed in the development forum. This forum is NOT for support.
becafuel
Posts: 15
Joined: Sun Feb 19, 2017 1:45 pm

Re: STM32F4xx and UART7/8

Postby becafuel » Thu Jan 25, 2018 10:09 pm

Hello Giovanni,

I understand your comment but the problem with Serial is that it is missing parameters like stop bits, word length, parity.


Best regards,
_______
Christophe

steved
Posts: 536
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 3 times
Been thanked: 54 times

Re: STM32F4xx and UART7/8

Postby steved » Thu Jan 25, 2018 10:29 pm

becafuel wrote:Hello Giovanni,

I understand your comment but the problem with Serial is that it is missing parameters like stop bits, word length, parity.


Best regards,
_______
Christophe

You set them in the initialisation structure - it has a field for control register CR1 of the UART:

Code: Select all

/**
 * Calculate value for CR1 based on data bits, parity, mode
 *
 * Note: Configured data bits include a bit for parity if enabled
 *
 * USART_CR1_M1 -   1 for 7-bit data (no parity); 0 otherwise
 * USART_CR1_M0 -   0 for 7-bit, 8-bit data (7,n or 8,n or 7,o or 7,e)
 *                  1 for 9-bit data (9,n or 8,o or 8,e)
 * USART_CR1_PCE    1 to enable parity
 * USART_CR1_PS     Parity selection - 0 for even, 1 for odd
 * USART_CR1_DEDT   Auto-RTS delay - set to maximum
 * USART_CR1_DEAT   Auto-RTS delay - set to maximum
 */

piwi1263
Posts: 10
Joined: Mon May 15, 2017 2:19 pm
Has thanked: 4 times
Been thanked: 1 time

Re: STM32F4xx and UART7/8

Postby piwi1263 » Thu Mar 08, 2018 10:37 pm

Hi All,

are you accepting updates on the USARTv1 LLD stuff ?

I've got an update available for it that adds support for UART7 and UART8.

I've attached a zip containing the changed files for hal_uart_lld.c hal_uart_lld.h

They are in <whatever-root>\ChibiOS\os\hal\ports\STM32\LLD\USARTv1

Kind regards,

Peter
Attachments
USARTv1.zip
(8.28 KiB) Downloaded 17 times


Return to “Small Change Requests”

Who is online

Users browsing this forum: No registered users and 2 guests