Solved
RCC_CFGR_MCOXPRE doesn't corrosponde to the manual
Posted on August 17, 2017 at 21:15
Hi,
has anyone checked in the stm32f4xx.h Lib the RCC_CFGR_MCOxPRE Register?
The values mentioned in the RM0090 manual don't fit the stm32f4xx.h
stm32f4xx.h:
&sharpdefine RCC_CFGR_MCO1PRE ((uint32_t)0x07000000)
&sharpdefine RCC_CFGR_MCO1PRE_0 ((uint32_t)0x01000000)&sharpdefine RCC_CFGR_MCO1PRE_1 ((uint32_t)0x02000000)&sharpdefine RCC_CFGR_MCO1PRE_2 ((uint32_t)0x04000000)&sharpdefine RCC_CFGR_MCO2PRE ((uint32_t)0x38000000)&sharpdefine RCC_CFGR_MCO2PRE_0 ((uint32_t)0x08000000)&sharpdefine RCC_CFGR_MCO2PRE_1 ((uint32_t)0x10000000)&sharpdefine RCC_CFGR_MCO2PRE_2 ((uint32_t)0x20000000)Manual RM0090:
Bits 27:29 MCO2PRE: MCO2 prescaler
Set and cleared by software to configure the prescaler of the MCO2. Modification of thisprescaler may generate glitches on MCO2. It is highly recommended to change thisprescaler only after reset before enabling the external oscillators and the PLLs.0xx: no division100: division by 2101: division by 3110: division by 4111: division by 5Bits 24:26 MCO1PRE: MCO1 prescalerSet and cleared by software to configure the prescaler of the MCO1. Modification of thisprescaler may generate glitches on MCO1. It is highly recommended to change thisprescaler only after reset before enabling the external oscillators and the PLL.0xx: no division100: division by 2101: division by 3110: division by 4111: division by 5Bit 23 I2SSRC: I2S clock selectionCan anyone verify this, or I'm just mixing something up?
Thanks
#stm32f4xx.h #stm32f4 #register #error