NUCLEO-F446RE board support: the 180 MHz clock configuration.
#define BSP_PLL_N
PLL N: VCO output = 1 MHz x N = 360 MHz.
DRIVER_MUST_CHECK DriverStatus_e bspClockInit(RccRegisters_t *rcc, PwrRegisters_t *pwr, FlashRegisters_t *flash)
Bring SYSCLK from the 16 MHz HSI reset state to 180 MHz.
#define BSP_PLL_M
PLL M: VCO input = HSE / M = 1 MHz.
#define BSP_FLASH_LATENCY
Flash wait states for 180 MHz at 2.7-3.6 V (RM0390 Table 5).
DriverStatus_e
Outcome of a driver call: a category for control flow, not a diagnosis.
@ DRIVER_STATUS_OK
Succeeded.
void flashEnableCaches(FlashRegisters_t *flash)
Turn on prefetch and the instruction and data caches.
DRIVER_MUST_CHECK DriverStatus_e pwrEnableOverdrive(PwrRegisters_t *pwr)
Enable over-drive, to run above the scale's normal maximum.
DRIVER_MUST_CHECK DriverStatus_e pwrWaitVoltageScaleReady(const PwrRegisters_t *pwr)
Wait until the regulator reaches the selected scale (CSR.VOSRDY).
DRIVER_MUST_CHECK DriverStatus_e pwrSetVoltageScale(PwrRegisters_t *pwr, uint32_t vos)
Select the regulator voltage scale for the coming PLL frequency.
#define PWR_CR_VOS_SCALE1
Scale 1: highest maximum frequency (reset value).
DRIVER_MUST_CHECK DriverStatus_e rccSysclkSwitch(RccRegisters_t *rcc, FlashRegisters_t *flash, uint32_t source, uint32_t latency)
Switch SYSCLK to a ready source and set the flash latency it needs.
DRIVER_MUST_CHECK DriverStatus_e rccHseEnable(RccRegisters_t *rcc, uint32_t bypass)
Turn on the external oscillator (HSE) and wait until ready.
DRIVER_MUST_CHECK DriverStatus_e rccBusPrescalerConfig(RccRegisters_t *rcc, uint32_t hpre, uint32_t ppre1, uint32_t ppre2)
Set the AHB, APB1 and APB2 prescalers.
DRIVER_MUST_CHECK DriverStatus_e rccPllEnable(RccRegisters_t *rcc)
Turn on the PLL and wait for lock.
void rccPwrClockEnable(RccRegisters_t *rcc)
Enable PWR's clock; needed before any PWR access.
DRIVER_MUST_CHECK DriverStatus_e rccPllConfig(RccRegisters_t *rcc, uint32_t source, uint32_t m, uint32_t n, uint32_t p)
Set the PLL's input source and M, N and P.
#define RCC_CFGR_PPRE_DIV2
HCLK / 2.
#define RCC_CFGR_HPRE_DIV1
SYSCLK / 1.
#define RCC_CR_HSEBYP
<span class="regaccess">rw</span> HSE bypass: external clock on OSC_IN.
#define RCC_CFGR_SYSCLK_PLL
Main PLL (P output).
#define RCC_PLLCFGR_PLLP_DIV2
VCO / 2.
#define RCC_CFGR_PPRE_DIV4
HCLK / 4.
#define RCC_PLLCFGR_PLLSRC_HSE
HSE feeds the PLL.
Flash interface register block.