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.
Post Reply
User avatar
FXCoder
Posts: 403
Joined: Sun Jun 12, 2016 4:10 am
Has thanked: 188 times
Been thanked: 134 times

USARTv2/hal_serial_lld.c invalid check of BRR

Post by FXCoder »

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: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: USARTv2/hal_serial_lld.c invalid check of BRR

Post by Giovanni »

Hi,

Fixed in trunk.

Giovanni
Post Reply