aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/hal/platforms/STM8/serial_lld.c4
-rw-r--r--readme.txt1
2 files changed, 3 insertions, 2 deletions
diff --git a/os/hal/platforms/STM8/serial_lld.c b/os/hal/platforms/STM8/serial_lld.c
index f43c16828..e1549de7c 100644
--- a/os/hal/platforms/STM8/serial_lld.c
+++ b/os/hal/platforms/STM8/serial_lld.c
@@ -117,7 +117,7 @@ static void notify1(void) {
*/
static void uart1_init(const SerialConfig *config) {
- UART1_BRR2 = ((uint8_t)(config->sc_brr >> 8) % (uint8_t)0xF0) |
+ UART1_BRR2 = ((uint8_t)(config->sc_brr >> 8) & (uint8_t)0xF0) |
((uint8_t)config->sc_brr & (uint8_t)0x0F);
UART1_BRR1 = (uint8_t)(config->sc_brr >> 4);
UART1_CR1 = config->sc_mode &
@@ -158,7 +158,7 @@ static void notify3(void) {
*/
static void uart3_init(const SerialConfig *config) {
- UART3_BRR2 = ((uint8_t)(config->sc_brr >> 8) % (uint8_t)0xF0) |
+ UART3_BRR2 = ((uint8_t)(config->sc_brr >> 8) & (uint8_t)0xF0) |
((uint8_t)config->sc_brr & (uint8_t)0x0F);
UART3_BRR1 = (uint8_t)(config->sc_brr >> 4);
UART3_CR1 = config->sc_mode &
diff --git a/readme.txt b/readme.txt
index e32988ae3..ac08f1a35 100644
--- a/readme.txt
+++ b/readme.txt
@@ -59,6 +59,7 @@
*****************************************************************************
*** 1.5.9 ***
+- FIX: Fixed STM8 baud rate setup error (bug 3010990).
- FIX: Fixed STM8 UART3 driver (bug 3009145).
- OPT: Small size optimization in the semaphores subsystem.
- OPT: Improvements in the STM8 port, the code is now smaller and generally