73 #define RCC_OFFSET (RCC_BASE - PERIPH_BASE)
76 #define CR_OFFSET (RCC_OFFSET + 0x00)
77 #define HSION_BitNumber 0x00
78 #define CR_HSION_BB (PERIPH_BB_BASE + (CR_OFFSET * 32) + (HSION_BitNumber * 4))
80 #define CSSON_BitNumber 0x13
81 #define CR_CSSON_BB (PERIPH_BB_BASE + (CR_OFFSET * 32) + (CSSON_BitNumber * 4))
83 #define PLLON_BitNumber 0x18
84 #define CR_PLLON_BB (PERIPH_BB_BASE + (CR_OFFSET * 32) + (PLLON_BitNumber * 4))
86 #define PLLI2SON_BitNumber 0x1A
87 #define CR_PLLI2SON_BB (PERIPH_BB_BASE + (CR_OFFSET * 32) + (PLLI2SON_BitNumber * 4))
90 #define PLLSAION_BitNumber 0x1C
91 #define CR_PLLSAION_BB (PERIPH_BB_BASE + (CR_OFFSET * 32) + (PLLSAION_BitNumber * 4))
95 #define CFGR_OFFSET (RCC_OFFSET + 0x08)
96 #define I2SSRC_BitNumber 0x17
97 #define CFGR_I2SSRC_BB (PERIPH_BB_BASE + (CFGR_OFFSET * 32) + (I2SSRC_BitNumber * 4))
101 #define BDCR_OFFSET (RCC_OFFSET + 0x70)
102 #define RTCEN_BitNumber 0x0F
103 #define BDCR_RTCEN_BB (PERIPH_BB_BASE + (BDCR_OFFSET * 32) + (RTCEN_BitNumber * 4))
105 #define BDRST_BitNumber 0x10
106 #define BDCR_BDRST_BB (PERIPH_BB_BASE + (BDCR_OFFSET * 32) + (BDRST_BitNumber * 4))
110 #define CSR_OFFSET (RCC_OFFSET + 0x74)
111 #define LSION_BitNumber 0x00
112 #define CSR_LSION_BB (PERIPH_BB_BASE + (CSR_OFFSET * 32) + (LSION_BitNumber * 4))
116 #define DCKCFGR_OFFSET (RCC_OFFSET + 0x8C)
117 #define TIMPRE_BitNumber 0x18
118 #define DCKCFGR_TIMPRE_BB (PERIPH_BB_BASE + (DCKCFGR_OFFSET * 32) + (TIMPRE_BitNumber * 4))
121 #define CFGR_MCO2_RESET_MASK ((uint32_t)0x07FFFFFF)
122 #define CFGR_MCO1_RESET_MASK ((uint32_t)0xF89FFFFF)
125 #define FLAG_MASK ((uint8_t)0x1F)
128 #define CR_BYTE3_ADDRESS ((uint32_t)0x40023802)
131 #define CIR_BYTE2_ADDRESS ((uint32_t)(RCC_BASE + 0x0C + 0x01))
134 #define CIR_BYTE3_ADDRESS ((uint32_t)(RCC_BASE + 0x0C + 0x02))
137 #define BDCR_ADDRESS (PERIPH_BASE + BDCR_OFFSET)
141 static __I uint8_t APBAHBPrescTable[16] = {0, 0, 0, 0, 1, 2, 3, 4, 1, 2, 3, 4, 6, 7, 8, 9};
216 RCC->CR |= (uint32_t)0x00000001;
219 RCC->CFGR = 0x00000000;
222 RCC->CR &= (uint32_t)0xEAF6FFFF;
225 RCC->PLLCFGR = 0x24003010;
228 RCC->PLLI2SCFGR = 0x20003000;
231 RCC->PLLSAICFGR = 0x24003000;
234 RCC->CR &= (uint32_t)0xFFFBFFFF;
237 RCC->CIR = 0x00000000;
240 RCC->DCKCFGR = 0x00000000;
267 assert_param(IS_RCC_HSE(RCC_HSE));
270 *(__IO uint8_t *) CR_BYTE3_ADDRESS = RCC_HSE_OFF;
273 *(__IO uint8_t *) CR_BYTE3_ADDRESS = RCC_HSE;
290 __IO uint32_t startupcounter = 0;
291 ErrorStatus status = ERROR;
292 FlagStatus hsestatus = RESET;
298 }
while((startupcounter != HSE_STARTUP_TIMEOUT) && (hsestatus == RESET));
323 assert_param(IS_RCC_CALIBRATION_VALUE(HSICalibrationValue));
328 tmpreg &= ~RCC_CR_HSITRIM;
331 tmpreg |= (uint32_t)HSICalibrationValue << 3;
358 assert_param(IS_FUNCTIONAL_STATE(NewState));
360 *(__IO uint32_t *) CR_HSION_BB = (uint32_t)NewState;
383 assert_param(IS_RCC_LSE(RCC_LSE));
387 *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_OFF;
390 *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_OFF;
397 *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_ON;
401 *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_Bypass | RCC_LSE_ON;
423 assert_param(IS_FUNCTIONAL_STATE(NewState));
425 *(__IO uint32_t *) CSR_LSION_BB = (uint32_t)NewState;
463 void RCC_PLLConfig(uint32_t RCC_PLLSource, uint32_t PLLM, uint32_t PLLN, uint32_t PLLP, uint32_t PLLQ)
466 assert_param(IS_RCC_PLL_SOURCE(RCC_PLLSource));
467 assert_param(IS_RCC_PLLM_VALUE(PLLM));
468 assert_param(IS_RCC_PLLN_VALUE(PLLN));
469 assert_param(IS_RCC_PLLP_VALUE(PLLP));
470 assert_param(IS_RCC_PLLQ_VALUE(PLLQ));
472 RCC->PLLCFGR = PLLM | (PLLN << 6) | (((PLLP >> 1) -1) << 16) | (RCC_PLLSource) |
489 assert_param(IS_FUNCTIONAL_STATE(NewState));
490 *(__IO uint32_t *) CR_PLLON_BB = (uint32_t)NewState;
493 #if defined (STM32F40_41xxx) || defined (STM32F401xx)
516 void RCC_PLLI2SConfig(uint32_t PLLI2SN, uint32_t PLLI2SR)
519 assert_param(IS_RCC_PLLI2SN_VALUE(PLLI2SN));
520 assert_param(IS_RCC_PLLI2SR_VALUE(PLLI2SR));
522 RCC->PLLI2SCFGR = (PLLI2SN << 6) | (PLLI2SR << 28);
526 #if defined (STM32F427_437xx) || defined (STM32F429_439xx)
552 void RCC_PLLI2SConfig(uint32_t PLLI2SN, uint32_t PLLI2SQ, uint32_t PLLI2SR)
555 assert_param(IS_RCC_PLLI2SN_VALUE(PLLI2SN));
556 assert_param(IS_RCC_PLLI2SQ_VALUE(PLLI2SQ));
557 assert_param(IS_RCC_PLLI2SR_VALUE(PLLI2SR));
559 RCC->PLLI2SCFGR = (PLLI2SN << 6) | (PLLI2SQ << 24) | (PLLI2SR << 28);
572 assert_param(IS_FUNCTIONAL_STATE(NewState));
573 *(__IO uint32_t *) CR_PLLI2SON_BB = (uint32_t)NewState;
601 assert_param(IS_RCC_PLLSAIN_VALUE(PLLSAIN));
602 assert_param(IS_RCC_PLLSAIR_VALUE(PLLSAIR));
604 RCC->PLLSAICFGR = (PLLSAIN << 6) | (PLLSAIQ << 24) | (PLLSAIR << 28);
619 assert_param(IS_FUNCTIONAL_STATE(NewState));
620 *(__IO uint32_t *) CR_PLLSAION_BB = (uint32_t)NewState;
637 assert_param(IS_FUNCTIONAL_STATE(NewState));
638 *(__IO uint32_t *) CR_CSSON_BB = (uint32_t)NewState;
664 assert_param(IS_RCC_MCO1SOURCE(RCC_MCO1Source));
665 assert_param(IS_RCC_MCO1DIV(RCC_MCO1Div));
670 tmpreg &= CFGR_MCO1_RESET_MASK;
673 tmpreg |= RCC_MCO1Source | RCC_MCO1Div;
702 assert_param(IS_RCC_MCO2SOURCE(RCC_MCO2Source));
703 assert_param(IS_RCC_MCO2DIV(RCC_MCO2Div));
708 tmpreg &= CFGR_MCO2_RESET_MASK;
711 tmpreg |= RCC_MCO2Source | RCC_MCO2Div;
868 assert_param(IS_RCC_SYSCLK_SOURCE(RCC_SYSCLKSource));
873 tmpreg &= ~RCC_CFGR_SW;
876 tmpreg |= RCC_SYSCLKSource;
893 return ((uint8_t)(RCC->CFGR & RCC_CFGR_SWS));
921 assert_param(IS_RCC_HCLK(RCC_SYSCLK));
926 tmpreg &= ~RCC_CFGR_HPRE;
929 tmpreg |= RCC_SYSCLK;
953 assert_param(IS_RCC_PCLK(RCC_HCLK));
958 tmpreg &= ~RCC_CFGR_PPRE1;
984 assert_param(IS_RCC_PCLK(RCC_HCLK));
989 tmpreg &= ~RCC_CFGR_PPRE2;
992 tmpreg |= RCC_HCLK << 3;
1033 uint32_t tmp = 0, presc = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2;
1036 tmp = RCC->CFGR & RCC_CFGR_SWS;
1051 pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22;
1052 pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM;
1057 pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6);
1062 pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6);
1065 pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2;
1075 tmp = RCC->CFGR & RCC_CFGR_HPRE;
1077 presc = APBAHBPrescTable[tmp];
1082 tmp = RCC->CFGR & RCC_CFGR_PPRE1;
1084 presc = APBAHBPrescTable[tmp];
1089 tmp = RCC->CFGR & RCC_CFGR_PPRE2;
1091 presc = APBAHBPrescTable[tmp];
1158 uint32_t tmpreg = 0;
1161 assert_param(IS_RCC_RTCCLK_SOURCE(RCC_RTCCLKSource));
1163 if ((RCC_RTCCLKSource & 0x00000300) == 0x00000300)
1168 tmpreg &= ~RCC_CFGR_RTCPRE;
1171 tmpreg |= (RCC_RTCCLKSource & 0xFFFFCFF);
1178 RCC->BDCR |= (RCC_RTCCLKSource & 0x00000FFF);
1191 assert_param(IS_FUNCTIONAL_STATE(NewState));
1193 *(__IO uint32_t *) BDCR_RTCEN_BB = (uint32_t)NewState;
1208 assert_param(IS_FUNCTIONAL_STATE(NewState));
1209 *(__IO uint32_t *) BDCR_BDRST_BB = (uint32_t)NewState;
1225 assert_param(IS_RCC_I2SCLK_SOURCE(RCC_I2SCLKSource));
1227 *(__IO uint32_t *) CFGR_I2SSRC_BB = RCC_I2SCLKSource;
1245 uint32_t tmpreg = 0;
1248 assert_param(IS_RCC_PLLI2S_DIVQ_VALUE(RCC_PLLI2SDivQ));
1250 tmpreg = RCC->DCKCFGR;
1253 tmpreg &= ~(RCC_DCKCFGR_PLLI2SDIVQ);
1256 tmpreg |= (RCC_PLLI2SDivQ - 1);
1259 RCC->DCKCFGR = tmpreg;
1277 uint32_t tmpreg = 0;
1280 assert_param(IS_RCC_PLLSAI_DIVQ_VALUE(RCC_PLLSAIDivQ));
1282 tmpreg = RCC->DCKCFGR;
1285 tmpreg &= ~(RCC_DCKCFGR_PLLSAIDIVQ);
1288 tmpreg |= ((RCC_PLLSAIDivQ - 1) << 8);
1291 RCC->DCKCFGR = tmpreg;
1313 uint32_t tmpreg = 0;
1316 assert_param(IS_RCC_SAIACLK_SOURCE(RCC_SAIBlockACLKSource));
1318 tmpreg = RCC->DCKCFGR;
1321 tmpreg &= ~RCC_DCKCFGR_SAI1ASRC;
1324 tmpreg |= RCC_SAIBlockACLKSource;
1327 RCC->DCKCFGR = tmpreg;
1349 uint32_t tmpreg = 0;
1352 assert_param(IS_RCC_SAIBCLK_SOURCE(RCC_SAIBlockBCLKSource));
1354 tmpreg = RCC->DCKCFGR;
1357 tmpreg &= ~RCC_DCKCFGR_SAI1BSRC;
1360 tmpreg |= RCC_SAIBlockBCLKSource;
1363 RCC->DCKCFGR = tmpreg;
1382 uint32_t tmpreg = 0;
1385 assert_param(IS_RCC_PLLSAI_DIVR_VALUE(RCC_PLLSAIDivR));
1387 tmpreg = RCC->DCKCFGR;
1390 tmpreg &= ~RCC_DCKCFGR_PLLSAIDIVR;
1393 tmpreg |= RCC_PLLSAIDivR;
1396 RCC->DCKCFGR = tmpreg;
1420 assert_param(IS_RCC_TIMCLK_PRESCALER(RCC_TIMCLKPrescaler));
1422 *(__IO uint32_t *) DCKCFGR_TIMPRE_BB = RCC_TIMCLKPrescaler;
1463 assert_param(IS_RCC_AHB1_CLOCK_PERIPH(RCC_AHB1Periph));
1465 assert_param(IS_FUNCTIONAL_STATE(NewState));
1466 if (NewState != DISABLE)
1468 RCC->AHB1ENR |= RCC_AHB1Periph;
1472 RCC->AHB1ENR &= ~RCC_AHB1Periph;
1495 assert_param(IS_RCC_AHB2_PERIPH(RCC_AHB2Periph));
1496 assert_param(IS_FUNCTIONAL_STATE(NewState));
1498 if (NewState != DISABLE)
1500 RCC->AHB2ENR |= RCC_AHB2Periph;
1504 RCC->AHB2ENR &= ~RCC_AHB2Periph;
1523 assert_param(IS_RCC_AHB3_PERIPH(RCC_AHB3Periph));
1524 assert_param(IS_FUNCTIONAL_STATE(NewState));
1526 if (NewState != DISABLE)
1528 RCC->AHB3ENR |= RCC_AHB3Periph;
1532 RCC->AHB3ENR &= ~RCC_AHB3Periph;
1575 assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph));
1576 assert_param(IS_FUNCTIONAL_STATE(NewState));
1578 if (NewState != DISABLE)
1580 RCC->APB1ENR |= RCC_APB1Periph;
1584 RCC->APB1ENR &= ~RCC_APB1Periph;
1620 assert_param(IS_RCC_APB2_PERIPH(RCC_APB2Periph));
1621 assert_param(IS_FUNCTIONAL_STATE(NewState));
1623 if (NewState != DISABLE)
1625 RCC->APB2ENR |= RCC_APB2Periph;
1629 RCC->APB2ENR &= ~RCC_APB2Periph;
1662 assert_param(IS_RCC_AHB1_RESET_PERIPH(RCC_AHB1Periph));
1663 assert_param(IS_FUNCTIONAL_STATE(NewState));
1665 if (NewState != DISABLE)
1667 RCC->AHB1RSTR |= RCC_AHB1Periph;
1671 RCC->AHB1RSTR &= ~RCC_AHB1Periph;
1691 assert_param(IS_RCC_AHB2_PERIPH(RCC_AHB2Periph));
1692 assert_param(IS_FUNCTIONAL_STATE(NewState));
1694 if (NewState != DISABLE)
1696 RCC->AHB2RSTR |= RCC_AHB2Periph;
1700 RCC->AHB2RSTR &= ~RCC_AHB2Periph;
1716 assert_param(IS_RCC_AHB3_PERIPH(RCC_AHB3Periph));
1717 assert_param(IS_FUNCTIONAL_STATE(NewState));
1719 if (NewState != DISABLE)
1721 RCC->AHB3RSTR |= RCC_AHB3Periph;
1725 RCC->AHB3RSTR &= ~RCC_AHB3Periph;
1765 assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph));
1766 assert_param(IS_FUNCTIONAL_STATE(NewState));
1767 if (NewState != DISABLE)
1769 RCC->APB1RSTR |= RCC_APB1Periph;
1773 RCC->APB1RSTR &= ~RCC_APB1Periph;
1806 assert_param(IS_RCC_APB2_RESET_PERIPH(RCC_APB2Periph));
1807 assert_param(IS_FUNCTIONAL_STATE(NewState));
1808 if (NewState != DISABLE)
1810 RCC->APB2RSTR |= RCC_APB2Periph;
1814 RCC->APB2RSTR &= ~RCC_APB2Periph;
1855 assert_param(IS_RCC_AHB1_LPMODE_PERIPH(RCC_AHB1Periph));
1856 assert_param(IS_FUNCTIONAL_STATE(NewState));
1857 if (NewState != DISABLE)
1859 RCC->AHB1LPENR |= RCC_AHB1Periph;
1863 RCC->AHB1LPENR &= ~RCC_AHB1Periph;
1887 assert_param(IS_RCC_AHB2_PERIPH(RCC_AHB2Periph));
1888 assert_param(IS_FUNCTIONAL_STATE(NewState));
1889 if (NewState != DISABLE)
1891 RCC->AHB2LPENR |= RCC_AHB2Periph;
1895 RCC->AHB2LPENR &= ~RCC_AHB2Periph;
1915 assert_param(IS_RCC_AHB3_PERIPH(RCC_AHB3Periph));
1916 assert_param(IS_FUNCTIONAL_STATE(NewState));
1917 if (NewState != DISABLE)
1919 RCC->AHB3LPENR |= RCC_AHB3Periph;
1923 RCC->AHB3LPENR &= ~RCC_AHB3Periph;
1967 assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph));
1968 assert_param(IS_FUNCTIONAL_STATE(NewState));
1969 if (NewState != DISABLE)
1971 RCC->APB1LPENR |= RCC_APB1Periph;
1975 RCC->APB1LPENR &= ~RCC_APB1Periph;
2012 assert_param(IS_RCC_APB2_PERIPH(RCC_APB2Periph));
2013 assert_param(IS_FUNCTIONAL_STATE(NewState));
2014 if (NewState != DISABLE)
2016 RCC->APB2LPENR |= RCC_APB2Periph;
2020 RCC->APB2LPENR &= ~RCC_APB2Periph;
2058 assert_param(IS_RCC_IT(RCC_IT));
2059 assert_param(IS_FUNCTIONAL_STATE(NewState));
2060 if (NewState != DISABLE)
2063 *(__IO uint8_t *) CIR_BYTE2_ADDRESS |= RCC_IT;
2068 *(__IO uint8_t *) CIR_BYTE2_ADDRESS &= (uint8_t)~RCC_IT;
2095 uint32_t statusreg = 0;
2096 FlagStatus bitstatus = RESET;
2099 assert_param(IS_RCC_FLAG(RCC_FLAG));
2102 tmp = RCC_FLAG >> 5;
2105 statusreg = RCC->CR;
2109 statusreg = RCC->BDCR;
2113 statusreg = RCC->CSR;
2117 tmp = RCC_FLAG & FLAG_MASK;
2118 if ((statusreg & ((uint32_t)1 << tmp)) != (uint32_t)RESET)
2140 RCC->CSR |= RCC_CSR_RMVF;
2159 ITStatus bitstatus = RESET;
2162 assert_param(IS_RCC_GET_IT(RCC_IT));
2165 if ((RCC->CIR & RCC_IT) != (uint32_t)RESET)
2194 assert_param(IS_RCC_CLEAR_IT(RCC_IT));
2198 *(__IO uint8_t *) CIR_BYTE3_ADDRESS = RCC_IT;
This file contains all the functions prototypes for the RCC firmware library.
void RCC_HCLKConfig(uint32_t RCC_SYSCLK)
Configures the AHB clock (HCLK).
void RCC_RTCCLKConfig(uint32_t RCC_RTCCLKSource)
Configures the RTC clock (RTCCLK).
void RCC_PLLCmd(FunctionalState NewState)
Enables or disables the main PLL.
void RCC_MCO1Config(uint32_t RCC_MCO1Source, uint32_t RCC_MCO1Div)
Selects the clock source to output on MCO1 pin(PA8).
void RCC_ClockSecuritySystemCmd(FunctionalState NewState)
Enables or disables the Clock Security System.
void RCC_SAIBlockACLKConfig(uint32_t RCC_SAIBlockACLKSource)
Configures SAI1BlockA clock source selection.
void RCC_SAIPLLI2SClkDivConfig(uint32_t RCC_PLLI2SDivQ)
Configures the SAI clock Divider coming from PLLI2S.
void RCC_AHB1PeriphClockLPModeCmd(uint32_t RCC_AHB1Periph, FunctionalState NewState)
Enables or disables the AHB1 peripheral clock during Low Power (Sleep) mode.
void RCC_PCLK2Config(uint32_t RCC_HCLK)
Configures the High Speed APB clock (PCLK2).
void RCC_APB1PeriphResetCmd(uint32_t RCC_APB1Periph, FunctionalState NewState)
Forces or releases Low Speed APB (APB1) peripheral reset.
void RCC_SAIPLLSAIClkDivConfig(uint32_t RCC_PLLSAIDivQ)
Configures the SAI clock Divider coming from PLLSAI.
void RCC_AHB2PeriphClockCmd(uint32_t RCC_AHB2Periph, FunctionalState NewState)
Enables or disables the AHB2 peripheral clock.
void RCC_ITConfig(uint8_t RCC_IT, FunctionalState NewState)
Enables or disables the specified RCC interrupts.
void RCC_AHB1PeriphClockCmd(uint32_t RCC_AHB1Periph, FunctionalState NewState)
Enables or disables the AHB1 peripheral clock.
void RCC_AHB3PeriphClockLPModeCmd(uint32_t RCC_AHB3Periph, FunctionalState NewState)
Enables or disables the AHB3 peripheral clock during Low Power (Sleep) mode.
void RCC_PLLI2SCmd(FunctionalState NewState)
Enables or disables the PLLI2S.
void RCC_PLLSAIConfig(uint32_t PLLSAIN, uint32_t PLLSAIQ, uint32_t PLLSAIR)
Configures the PLLSAI clock multiplication and division factors.
uint8_t RCC_GetSYSCLKSource(void)
Returns the clock source used as system clock.
void RCC_I2SCLKConfig(uint32_t RCC_I2SCLKSource)
Configures the I2S clock source (I2SCLK).
void RCC_TIMCLKPresConfig(uint32_t RCC_TIMCLKPrescaler)
Configures the Timers clocks prescalers selection.
void RCC_AHB3PeriphClockCmd(uint32_t RCC_AHB3Periph, FunctionalState NewState)
Enables or disables the AHB3 peripheral clock.
void RCC_DeInit(void)
Resets the RCC clock configuration to the default reset state.
void RCC_APB2PeriphClockLPModeCmd(uint32_t RCC_APB2Periph, FunctionalState NewState)
Enables or disables the APB2 peripheral clock during Low Power (Sleep) mode.
void RCC_PCLK1Config(uint32_t RCC_HCLK)
Configures the Low Speed APB clock (PCLK1).
void RCC_AHB1PeriphResetCmd(uint32_t RCC_AHB1Periph, FunctionalState NewState)
Forces or releases AHB1 peripheral reset.
void RCC_SAIBlockBCLKConfig(uint32_t RCC_SAIBlockBCLKSource)
Configures SAI1BlockB clock source selection.
void RCC_GetClocksFreq(RCC_ClocksTypeDef *RCC_Clocks)
Returns the frequencies of different on chip clocks; SYSCLK, HCLK, PCLK1 and PCLK2.
FlagStatus RCC_GetFlagStatus(uint8_t RCC_FLAG)
Checks whether the specified RCC flag is set or not.
void RCC_APB1PeriphClockLPModeCmd(uint32_t RCC_APB1Periph, FunctionalState NewState)
Enables or disables the APB1 peripheral clock during Low Power (Sleep) mode.
void RCC_BackupResetCmd(FunctionalState NewState)
Forces or releases the Backup domain reset.
void RCC_LTDCCLKDivConfig(uint32_t RCC_PLLSAIDivR)
Configures the LTDC clock Divider coming from PLLSAI.
void RCC_MCO2Config(uint32_t RCC_MCO2Source, uint32_t RCC_MCO2Div)
Selects the clock source to output on MCO2 pin(PC9).
void RCC_SYSCLKConfig(uint32_t RCC_SYSCLKSource)
Configures the system clock (SYSCLK).
void RCC_AHB2PeriphResetCmd(uint32_t RCC_AHB2Periph, FunctionalState NewState)
Forces or releases AHB2 peripheral reset.
uint32_t SYSCLK_Frequency
void RCC_AHB3PeriphResetCmd(uint32_t RCC_AHB3Periph, FunctionalState NewState)
Forces or releases AHB3 peripheral reset.
void RCC_ClearFlag(void)
Clears the RCC reset flags. The reset flags are: RCC_FLAG_PINRST, RCC_FLAG_PORRST, RCC_FLAG_SFTRST, RCC_FLAG_IWDGRST, RCC_FLAG_WWDGRST, RCC_FLAG_LPWRRST.
ITStatus RCC_GetITStatus(uint8_t RCC_IT)
Checks whether the specified RCC interrupt has occurred or not.
void RCC_ClearITPendingBit(uint8_t RCC_IT)
Clears the RCC's interrupt pending bits.
void RCC_AHB2PeriphClockLPModeCmd(uint32_t RCC_AHB2Periph, FunctionalState NewState)
Enables or disables the AHB2 peripheral clock during Low Power (Sleep) mode.
void RCC_LSEConfig(uint8_t RCC_LSE)
Configures the External Low Speed oscillator (LSE).
void RCC_APB1PeriphClockCmd(uint32_t RCC_APB1Periph, FunctionalState NewState)
Enables or disables the Low Speed APB (APB1) peripheral clock.
void RCC_APB2PeriphClockCmd(uint32_t RCC_APB2Periph, FunctionalState NewState)
Enables or disables the High Speed APB (APB2) peripheral clock.
ErrorStatus RCC_WaitForHSEStartUp(void)
Waits for HSE start-up.
void RCC_PLLConfig(uint32_t RCC_PLLSource, uint32_t PLLM, uint32_t PLLN, uint32_t PLLP, uint32_t PLLQ)
Configures the main PLL clock source, multiplication and division factors.
void RCC_HSEConfig(uint8_t RCC_HSE)
Configures the External High Speed oscillator (HSE).
void RCC_RTCCLKCmd(FunctionalState NewState)
Enables or disables the RTC clock.
void RCC_PLLSAICmd(FunctionalState NewState)
Enables or disables the PLLSAI.
void RCC_APB2PeriphResetCmd(uint32_t RCC_APB2Periph, FunctionalState NewState)
Forces or releases High Speed APB (APB2) peripheral reset.
void RCC_HSICmd(FunctionalState NewState)
Enables or disables the Internal High Speed oscillator (HSI).
void RCC_AdjustHSICalibrationValue(uint8_t HSICalibrationValue)
Adjusts the Internal High Speed oscillator (HSI) calibration value.
void RCC_LSICmd(FunctionalState NewState)
Enables or disables the Internal Low Speed oscillator (LSI).