USARTv2/hal_serial_lld.c invalid check of BRR Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
User avatar
FXCoder
Posts: 212
Joined: Sun Jun 12, 2016 4:10 am
Location: Sydney, Australia
Has thanked: 85 times
Been thanked: 62 times

USARTv2/hal_serial_lld.c invalid check of BRR  Topic is solved

Postby FXCoder » Sat Feb 08, 2020 2:19 pm

Missing a digit in the osalDbgAssert(...) value checking if BRR is over halfword limit...

Code: Select all

### Eclipse Workspace Patch 1.0
#P chibios_trunk
Index: os/hal/ports/STM32/LLD/USARTv2/hal_serial_lld.c
===================================================================
--- os/hal/ports/STM32/LLD/USARTv2/hal_serial_lld.c   (revision 13335)
+++ os/hal/ports/STM32/LLD/USARTv2/hal_serial_lld.c   (working copy)
@@ -255,7 +255,7 @@
     if (config->cr1 & USART_CR1_OVER8)
       brr = ((brr & ~7) * 2) | (brr & 7);
 
-    osalDbgAssert(brr < 0x1000, "invalid BRR value");
+    osalDbgAssert(brr < 0x10000, "invalid BRR value");
   }
   u->BRR = brr;


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

Re: USARTv2/hal_serial_lld.c invalid check of BRR

Postby Giovanni » Tue Feb 18, 2020 3:04 pm

Hi,

Fixed in trunk.

Giovanni


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 2 guests