BUG in USARTv2 LLD STM32 ports Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
mhmtsui
Posts: 1
Joined: Thu Jun 08, 2017 6:53 pm
Been thanked: 1 time

BUG in USARTv2 LLD STM32 ports  Topic is solved

Postby mhmtsui » Thu Jun 08, 2017 7:01 pm

When trying to use USART 9-bit mode in STM32F7, the DMA half word mode isn't set.

In F4, 9-bit mode is set by setting the bit USART_CR1_M,
but in F7, 9-bit mode is set by setting the bit USART_CR1_M_0 and clearing the bit USART_CR1_M_1
Therefore the checking condition is wrong,

In ./ChibiOS/os/hal/ports/STM32/LLD/USARTv2/hal_uart_lld.c:

/* Static DMA setup, the transfer size depends on the USART settings,
it is 16 bits if M=1 and PCE=0 else it is 8 bits.*/
if ((uartp->config->cr1 & (USART_CR1_M | USART_CR1_PCE)) == USART_CR1_M)
--> should be corrected as
/* Static DMA setup, the transfer size depends on the USART settings,
it is 16 bits if M0=1, M1 = 0 and PCE=0 else it is 8 bits.*/
if ((uartp->config->cr1 & (USART_CR1_M | USART_CR1_PCE)) == USART_CR1_M_0) :D

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

Re: BUG in USARTv2 LLD STM32 ports

Postby Giovanni » Thu Jun 08, 2017 9:09 pm

Hi,

Thanks, will look into this.

Giovanni

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

Re: BUG in USARTv2 LLD STM32 ports

Postby Giovanni » Sun Jul 02, 2017 7:41 am

Hi,

Fixed as bug #851.

Giovanni


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 63 guests