55#if !defined (HSE_VALUE)
56#define HSE_VALUE ((uint32_t)25000000)
59#if !defined (CSI_VALUE)
60 #define CSI_VALUE ((uint32_t)4000000)
63#if !defined (HSI_VALUE)
64 #define HSI_VALUE ((uint32_t)64000000)
95#if defined(USER_VECT_TAB_ADDRESS)
96#if defined(DUAL_CORE) && defined(CORE_CM4)
100#if defined(VECT_TAB_SRAM)
101#define VECT_TAB_BASE_ADDRESS D2_AXISRAM_BASE
104#define VECT_TAB_BASE_ADDRESS FLASH_BANK2_BASE
111#if defined(VECT_TAB_SRAM)
112#define VECT_TAB_BASE_ADDRESS D1_AXISRAM_BASE
115#define VECT_TAB_BASE_ADDRESS FLASH_BANK1_BASE
120#if !defined(VECT_TAB_OFFSET)
121#define VECT_TAB_OFFSET 0x00000000U
153 const uint8_t
D1CorePrescTable[16] = {0, 0, 0, 0, 1, 2, 3, 4, 1, 2, 3, 4, 6, 7, 8, 9};
180#if defined (DATA_IN_D2_SRAM)
181 __IO uint32_t tmpreg;
185 #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
186 SCB->CPACR |= ((3UL << (10*2))|(3UL << (11*2)));
201 RCC->CFGR = 0x00000000;
204 RCC->CR &= 0xEAF6ED7FU;
213#if defined(D3_SRAM_BASE)
215 RCC->D1CFGR = 0x00000000;
218 RCC->D2CFGR = 0x00000000;
221 RCC->D3CFGR = 0x00000000;
224 RCC->CDCFGR1 = 0x00000000;
227 RCC->CDCFGR2 = 0x00000000;
230 RCC->SRDCFGR = 0x00000000;
233 RCC->PLLCKSELR = 0x02020200;
236 RCC->PLLCFGR = 0x01FF0000;
238 RCC->PLL1DIVR = 0x01010280;
240 RCC->PLL1FRACR = 0x00000000;
243 RCC->PLL2DIVR = 0x01010280;
247 RCC->PLL2FRACR = 0x00000000;
249 RCC->PLL3DIVR = 0x01010280;
252 RCC->PLL3FRACR = 0x00000000;
255 RCC->CR &= 0xFFFBFFFFU;
258 RCC->CIER = 0x00000000;
260#if (STM32H7_DEV_ID == 0x450UL)
262 if((
DBGMCU->IDCODE & 0xFFFF0000U) < 0x20000000U)
266 *((
__IO uint32_t*)0x51008108) = 0x000000001U;
270#if defined(DATA_IN_D2_SRAM)
272#if defined(RCC_AHB2ENR_D2SRAM3EN)
274#elif defined(RCC_AHB2ENR_D2SRAM2EN)
277 RCC->AHB2ENR |= (RCC_AHB2ENR_AHBSRAM1EN | RCC_AHB2ENR_AHBSRAM2EN);
280 tmpreg =
RCC->AHB2ENR;
284#if defined(DUAL_CORE) && defined(CORE_CM4)
286#if defined(USER_VECT_TAB_ADDRESS)
287 SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET;
308#if defined(USER_VECT_TAB_ADDRESS)
309 SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET;
354 uint32_t pllp, pllsource, pllm, pllfracen, hsivalue, tmp;
355 uint32_t common_system_clock;
356 float_t fracn1, pllvco;
392 pllvco = ( (float_t)hsivalue / (float_t)pllm) * ((float_t)(uint32_t)(
RCC->PLL1DIVR &
RCC_PLL1DIVR_N1) + (fracn1/(float_t)0x2000) +(float_t)1 );
397 pllvco = ((float_t)
CSI_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(
RCC->PLL1DIVR &
RCC_PLL1DIVR_N1) + (fracn1/(float_t)0x2000) +(float_t)1 );
401 pllvco = ((float_t)
HSE_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(
RCC->PLL1DIVR &
RCC_PLL1DIVR_N1) + (fracn1/(float_t)0x2000) +(float_t)1 );
406 pllvco = ((float_t)hsivalue / (float_t)pllm) * ((float_t)(uint32_t)(
RCC->PLL1DIVR &
RCC_PLL1DIVR_N1) + (fracn1/(float_t)0x2000) +(float_t)1 );
410 common_system_clock = (uint32_t)(float_t)(pllvco/(float_t)pllp);
414 common_system_clock = 0U;
424#if defined (RCC_D1CFGR_D1CPRE)
428 common_system_clock >>= tmp;
437 common_system_clock >>= tmp;
444#if defined(DUAL_CORE) && defined(CORE_CM4)
476#if defined(USE_PWR_LDO_SUPPLY)
487#elif defined(USE_PWR_EXTERNAL_SOURCE_SUPPLY)
497#elif defined(USE_PWR_DIRECT_SMPS_SUPPLY) && defined(SMPS)
503#elif defined(USE_PWR_SMPS_1V8_SUPPLIES_LDO) && defined(SMPS)
509#elif defined(USE_PWR_SMPS_2V5_SUPPLIES_LDO) && defined(SMPS)
515#elif defined(USE_PWR_SMPS_1V8_SUPPLIES_EXT_AND_LDO) && defined(SMPS)
517 PWR->CR3 |= PWR_CR3_SMPSLEVEL_0 | PWR_CR3_SMPSEXTHP | PWR_CR3_SMPSEN |
PWR_CR3_LDOEN;
521#elif defined(USE_PWR_SMPS_2V5_SUPPLIES_EXT_AND_LDO) && defined(SMPS)
523 PWR->CR3 |= PWR_CR3_SMPSLEVEL_1 | PWR_CR3_SMPSEXTHP | PWR_CR3_SMPSEN |
PWR_CR3_LDOEN;
527#elif defined(USE_PWR_SMPS_1V8_SUPPLIES_EXT) && defined(SMPS)
533#elif defined(USE_PWR_SMPS_2V5_SUPPLIES_EXT) && defined(SMPS)
#define __IO
Defines 'read / write' permissions.
#define SCB
SCB configuration struct.
#define CLEAR_BIT(REG, BIT)
#define SET_BIT(REG, BIT)
#define MODIFY_REG(REG, CLEARMASK, SETMASK)
#define READ_BIT(REG, BIT)
#define RCC_CFGR_SWS
SWS[2:0] bits (System Clock Switch Status).
#define PWR_CR3_BYPASS
Power Management Unit bypass.
#define RCC_PLLCKSELR_PLLSRC_CSI
CSI source clock selected.
#define RCC_CR_HSIDIV
Internal High Speed clock divider selection.
#define PWR_CR3_LDOEN
Low Drop Output regulator enable.
#define RCC_D1CFGR_D1CPRE
D1CPRE[2:0] bits (Domain 1 Core prescaler).
#define RCC_PLLCKSELR_PLLSRC_HSI
HSI source clock selected.
#define RCC_AHB2ENR_D2SRAM2EN
#define RCC_PLLCKSELR_PLLSRC
#define RCC_PLLCKSELR_DIVM1
#define RCC_CFGR_SWS_HSI
HSI used as system clock.
#define PWR_CSR1_ACTVOSRDY
Ready bit for current actual used VOS for VDD11 Voltage Scaling.
#define RCC_CFGR_SWS_PLL1
PLL1 used as system clock.
#define FLASH_LATENCY_DEFAULT
#define RCC_PLLCFGR_PLL1FRACEN_Pos
#define RCC_CFGR_SWS_CSI
CSI used as system clock.
#define RCC_D1CFGR_HPRE
HPRE[3:0] bits (AHB3 prescaler).
#define RCC_AHB3ENR_FMCEN
#define RCC_PLLCKSELR_PLLSRC_HSE
HSE source clock selected.
#define RCC_AHB2ENR_D2SRAM1EN
#define RCC_PLLCFGR_PLL1FRACEN
#define RCC_CFGR_SWS_HSE
HSE used as system clock.
#define FLASH_ACR_LATENCY
Read Latency.
#define RCC_PLL1FRACR_FRACN1
#define RCC_D1CFGR_D1CPRE_Pos
#define RCC_CR_HSION
Internal High Speed clock enable.
#define RCC_D1CFGR_HPRE_Pos
< D1HPRE configuration
void SystemInit(void)
Setup the microcontroller system Initialize the FPU setting and vector table location configuration.
void ExitRun0Mode(void)
Exit Run* mode and Configure the system Power Supply.
void SystemCoreClockUpdate(void)
Update SystemCoreClock variable according to Clock Register Values.
uint32_t SystemD2Clock
System Domain2 Clock Frequency.
uint32_t SystemCoreClock
System Domain1 Clock Frequency.
const uint8_t D1CorePrescTable[16]
D1CorePrescTable prescalers table values.
CMSIS STM32H7xx Device Peripheral Access Layer Header File.
#define CSI_VALUE
Internal oscillator (CSI) default value.
#define HSI_VALUE
Internal High Speed oscillator (HSI) value.
#define HSE_VALUE
Adjust the value of External High Speed oscillator (HSE) used in your application.