This is an automated email from the ASF dual-hosted git repository.

kasjer pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
     new ffd5a795b hw/mcu/stm32f4: Fix mcu info command
ffd5a795b is described below

commit ffd5a795ba00dd681d3a8d2f0a9dc36daf0ac98a
Author: Jerzy Kasenberg <[email protected]>
AuthorDate: Fri Apr 24 08:21:39 2026 +0200

    hw/mcu/stm32f4: Fix mcu info command
    
    When TIM frequencies were calculated for APB1
    timers prescaler from APB2 was taken.
    This resulted in wrong frequency being printed
    in /mcu info command for timers
    
    Now correct filed is taken for prescaler
    
    Signed-off-by: Jerzy Kasenberg <[email protected]>
---
 hw/mcu/stm/stm32f4xx/mcu_cli/src/mcu_cli.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/mcu/stm/stm32f4xx/mcu_cli/src/mcu_cli.c 
b/hw/mcu/stm/stm32f4xx/mcu_cli/src/mcu_cli.c
index ef407c7ef..e82da131b 100644
--- a/hw/mcu/stm/stm32f4xx/mcu_cli/src/mcu_cli.c
+++ b/hw/mcu/stm/stm32f4xx/mcu_cli/src/mcu_cli.c
@@ -205,7 +205,7 @@ static void
 print_apb1_peripherals(struct streamer *streamer, bool all)
 {
     uint32_t pckl1 = HAL_RCC_GetPCLK1Freq();
-    uint32_t timmul = RCC->CFGR & RCC_CFGR_PPRE2_2 ? 2 : 1;
+    uint32_t timmul = RCC->CFGR & RCC_CFGR_PPRE1_2 ? 2 : 1;
     char freq_buf[20];
 
     streamer_printf(streamer, "  APB1 PCLK1: %s\n", freq_str(pckl1, freq_buf));

Reply via email to