mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-04-05 01:59:55 +00:00
bsps/arm/stm32f4: fix HPRE bitfield Possible Bug in STM32F4 RCC header
Fix HPRE macro in cfgr register: original spanned bits 4–15, accidentally overwriting APB1/APB2 prescaler bits (10–15). Corrected range to 4–7, matching hardware specification.
This commit is contained in:
committed by
Kinsey Moore
parent
eeee01453d
commit
6e83c38851
@@ -128,7 +128,7 @@ typedef struct {
|
||||
#define STM32F4_RCC_CFGR_PPRE1_DIV4 STM32F4_RCC_CFGR_PPRE1(5)
|
||||
#define STM32F4_RCC_CFGR_PPRE1_DIV8 STM32F4_RCC_CFGR_PPRE1(6)
|
||||
#define STM32F4_RCC_CFGR_PPRE1_DIV16 STM32F4_RCC_CFGR_PPRE1(7)
|
||||
#define STM32F4_RCC_CFGR_HPRE(val) BSP_FLD32(val, 4, 15) // AHB prescalar
|
||||
#define STM32F4_RCC_CFGR_HPRE(val) BSP_FLD32(val, 4, 7) // AHB prescalar
|
||||
#define STM32F4_RCC_CFGR_HPRE_GET(reg) BSP_FLD32GET(reg, 4, 7)
|
||||
#define STM32F4_RCC_CFGR_HPRE_SET(reg, val) BSP_FLD32SET(reg, val, 4, 7)
|
||||
#define STM32F4_RCC_CFGR_HPRE_DIV1 STM32F4_RCC_CFGR_HPRE(0)
|
||||
|
||||
Reference in New Issue
Block a user