STM32L4xx_HAL_Driver  1.14.0
Extended Clock management functions

Extended Clock management functions. More...

Functions

HAL_StatusTypeDef HAL_RCCEx_EnablePLLSAI1 (RCC_PLLSAI1InitTypeDef *PLLSAI1Init)
 Enable PLLSAI1. More...
 
HAL_StatusTypeDef HAL_RCCEx_DisablePLLSAI1 (void)
 Disable PLLSAI1. More...
 
HAL_StatusTypeDef HAL_RCCEx_EnablePLLSAI2 (RCC_PLLSAI2InitTypeDef *PLLSAI2Init)
 Enable PLLSAI2. More...
 
HAL_StatusTypeDef HAL_RCCEx_DisablePLLSAI2 (void)
 Disable PLLISAI2. More...
 
void HAL_RCCEx_WakeUpStopCLKConfig (uint32_t WakeUpClk)
 Configure the oscillator clock source for wakeup from Stop and CSS backup clock. More...
 
void HAL_RCCEx_StandbyMSIRangeConfig (uint32_t MSIRange)
 Configure the MSI range after standby mode. More...
 
void HAL_RCCEx_EnableLSECSS (void)
 Enable the LSE Clock Security System. More...
 
void HAL_RCCEx_DisableLSECSS (void)
 Disable the LSE Clock Security System. More...
 
void HAL_RCCEx_EnableLSECSS_IT (void)
 Enable the LSE Clock Security System Interrupt & corresponding EXTI line. More...
 
void HAL_RCCEx_LSECSS_IRQHandler (void)
 Handle the RCC LSE Clock Security System interrupt request. More...
 
void HAL_RCCEx_LSECSS_Callback (void)
 RCCEx LSE Clock Security System interrupt callback. More...
 
void HAL_RCCEx_EnableLSCO (uint32_t LSCOSource)
 Select the Low Speed clock source to output on LSCO pin (PA2). More...
 
void HAL_RCCEx_DisableLSCO (void)
 Disable the Low Speed clock output. More...
 
void HAL_RCCEx_EnableMSIPLLMode (void)
 Enable the PLL-mode of the MSI. More...
 
void HAL_RCCEx_DisableMSIPLLMode (void)
 Disable the PLL-mode of the MSI. More...
 

Detailed Description

Extended Clock management functions.

 ===============================================================================
                ##### Extended clock management functions  #####
 ===============================================================================
    [..]
    This subsection provides a set of functions allowing to control the
    activation or deactivation of MSI PLL-mode, PLLSAI1, PLLSAI2, LSE CSS,
    Low speed clock output and clock after wake-up from STOP mode.

Function Documentation

◆ HAL_RCCEx_DisableLSCO()

void HAL_RCCEx_DisableLSCO ( void  )

Disable the Low Speed clock output.

Return values
None

Definition at line 2452 of file stm32l4xx_hal_rcc_ex.c.

2453 {
2454  FlagStatus pwrclkchanged = RESET;
2455  FlagStatus backupchanged = RESET;
2456 
2457  /* Update LSCOEN bit in Backup Domain control register */
2458  if(__HAL_RCC_PWR_IS_CLK_DISABLED())
2459  {
2460  __HAL_RCC_PWR_CLK_ENABLE();
2461  pwrclkchanged = SET;
2462  }
2463  if(HAL_IS_BIT_CLR(PWR->CR1, PWR_CR1_DBP))
2464  {
2465  /* Enable access to the backup domain */
2467  backupchanged = SET;
2468  }
2469 
2470  CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSCOEN);
2471 
2472  /* Restore previous configuration */
2473  if(backupchanged == SET)
2474  {
2475  /* Disable access to the backup domain */
2477  }
2478  if(pwrclkchanged == SET)
2479  {
2480  __HAL_RCC_PWR_CLK_DISABLE();
2481  }
2482 }
void HAL_PWR_DisableBkUpAccess(void)
Disable access to the backup domain (RTC registers, RTC backup data registers).
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)
void HAL_PWR_EnableBkUpAccess(void)
Enable access to the backup domain (RTC registers, RTC backup data registers).

◆ HAL_RCCEx_DisableLSECSS()

void HAL_RCCEx_DisableLSECSS ( void  )

Disable the LSE Clock Security System.

Note
LSE Clock Security System can only be disabled after a LSE failure detection.
Return values
None

Definition at line 2343 of file stm32l4xx_hal_rcc_ex.c.

2344 {
2345  CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSECSSON) ;
2346 
2347  /* Disable LSE CSS IT if any */
2348  __HAL_RCC_DISABLE_IT(RCC_IT_LSECSS);
2349 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ HAL_RCCEx_DisableMSIPLLMode()

void HAL_RCCEx_DisableMSIPLLMode ( void  )

Disable the PLL-mode of the MSI.

Note
PLL-mode of the MSI is automatically reset when LSE oscillator is disabled.
Return values
None

Definition at line 2500 of file stm32l4xx_hal_rcc_ex.c.

2501 {
2502  CLEAR_BIT(RCC->CR, RCC_CR_MSIPLLEN) ;
2503 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ HAL_RCCEx_DisablePLLSAI1()

HAL_StatusTypeDef HAL_RCCEx_DisablePLLSAI1 ( void  )

Disable PLLSAI1.

Return values
HALstatus

Definition at line 2124 of file stm32l4xx_hal_rcc_ex.c.

2125 {
2126  uint32_t tickstart;
2127  HAL_StatusTypeDef status = HAL_OK;
2128 
2129  /* Disable the PLLSAI1 */
2130  __HAL_RCC_PLLSAI1_DISABLE();
2131 
2132  /* Get Start Tick*/
2133  tickstart = HAL_GetTick();
2134 
2135  /* Wait till PLLSAI1 is ready */
2136  while(READ_BIT(RCC->CR, RCC_CR_PLLSAI1RDY) != 0U)
2137  {
2138  if((HAL_GetTick() - tickstart) > PLLSAI1_TIMEOUT_VALUE)
2139  {
2140  status = HAL_TIMEOUT;
2141  break;
2142  }
2143  }
2144 
2145  /* Disable the PLLSAI1 Clock outputs */
2146  __HAL_RCC_PLLSAI1CLKOUT_DISABLE(RCC_PLLSAI1CFGR_PLLSAI1PEN|RCC_PLLSAI1CFGR_PLLSAI1QEN|RCC_PLLSAI1CFGR_PLLSAI1REN);
2147 
2148  /* Reset PLL source to save power if no PLLs on */
2149 #if defined(RCC_PLLSAI2_SUPPORT)
2150  if(READ_BIT(RCC->CR, (RCC_CR_PLLRDY | RCC_CR_PLLSAI2RDY)) == 0U)
2151  {
2152  MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC, RCC_PLLSOURCE_NONE);
2153  }
2154 #else
2155  if(READ_BIT(RCC->CR, RCC_CR_PLLRDY) == 0U)
2156  {
2157  MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC, RCC_PLLSOURCE_NONE);
2158  }
2159 #endif /* RCC_PLLSAI2_SUPPORT */
2160 
2161  return status;
2162 }
uint32_t HAL_GetTick(void)
Provide a tick value in millisecond.
return HAL_OK
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ HAL_RCCEx_DisablePLLSAI2()

HAL_StatusTypeDef HAL_RCCEx_DisablePLLSAI2 ( void  )

Disable PLLISAI2.

Return values
HALstatus

Definition at line 2252 of file stm32l4xx_hal_rcc_ex.c.

2253 {
2254  uint32_t tickstart;
2255  HAL_StatusTypeDef status = HAL_OK;
2256 
2257  /* Disable the PLLSAI2 */
2258  __HAL_RCC_PLLSAI2_DISABLE();
2259 
2260  /* Get Start Tick*/
2261  tickstart = HAL_GetTick();
2262 
2263  /* Wait till PLLSAI2 is ready */
2264  while(READ_BIT(RCC->CR, RCC_CR_PLLSAI2RDY) != 0U)
2265  {
2266  if((HAL_GetTick() - tickstart) > PLLSAI2_TIMEOUT_VALUE)
2267  {
2268  status = HAL_TIMEOUT;
2269  break;
2270  }
2271  }
2272 
2273  /* Disable the PLLSAI2 Clock outputs */
2274 #if defined(RCC_PLLSAI2Q_DIV_SUPPORT)
2275  __HAL_RCC_PLLSAI2CLKOUT_DISABLE(RCC_PLLSAI2CFGR_PLLSAI2PEN|RCC_PLLSAI2CFGR_PLLSAI2QEN|RCC_PLLSAI2CFGR_PLLSAI2REN);
2276 #else
2277  __HAL_RCC_PLLSAI2CLKOUT_DISABLE(RCC_PLLSAI2CFGR_PLLSAI2PEN|RCC_PLLSAI2CFGR_PLLSAI2REN);
2278 #endif /* RCC_PLLSAI2M_DIV_1_16_SUPPORT && RCC_PLLSAI2Q_DIV_SUPPORT */
2279 
2280  /* Reset PLL source to save power if no PLLs on */
2281  if(READ_BIT(RCC->CR, (RCC_CR_PLLRDY | RCC_CR_PLLSAI1RDY)) == 0U)
2282  {
2283  MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC, RCC_PLLSOURCE_NONE);
2284  }
2285 
2286  return status;
2287 }
uint32_t HAL_GetTick(void)
Provide a tick value in millisecond.
return HAL_OK
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ HAL_RCCEx_EnableLSCO()

void HAL_RCCEx_EnableLSCO ( uint32_t  LSCOSource)

Select the Low Speed clock source to output on LSCO pin (PA2).

Parameters
LSCOSourcespecifies the Low Speed clock source to output. This parameter can be one of the following values:
  • RCC_LSCOSOURCE_LSI LSI clock selected as LSCO source
  • RCC_LSCOSOURCE_LSE LSE clock selected as LSCO source
Return values
None

Definition at line 2405 of file stm32l4xx_hal_rcc_ex.c.

2406 {
2407  GPIO_InitTypeDef GPIO_InitStruct;
2408  FlagStatus pwrclkchanged = RESET;
2409  FlagStatus backupchanged = RESET;
2410 
2411  /* Check the parameters */
2412  assert_param(IS_RCC_LSCOSOURCE(LSCOSource));
2413 
2414  /* LSCO Pin Clock Enable */
2415  __LSCO_CLK_ENABLE();
2416 
2417  /* Configue the LSCO pin in analog mode */
2418  GPIO_InitStruct.Pin = LSCO_PIN;
2419  GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
2420  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
2421  GPIO_InitStruct.Pull = GPIO_NOPULL;
2422  HAL_GPIO_Init(LSCO_GPIO_PORT, &GPIO_InitStruct);
2423 
2424  /* Update LSCOSEL clock source in Backup Domain control register */
2425  if(__HAL_RCC_PWR_IS_CLK_DISABLED())
2426  {
2427  __HAL_RCC_PWR_CLK_ENABLE();
2428  pwrclkchanged = SET;
2429  }
2430  if(HAL_IS_BIT_CLR(PWR->CR1, PWR_CR1_DBP))
2431  {
2433  backupchanged = SET;
2434  }
2435 
2436  MODIFY_REG(RCC->BDCR, RCC_BDCR_LSCOSEL | RCC_BDCR_LSCOEN, LSCOSource | RCC_BDCR_LSCOEN);
2437 
2438  if(backupchanged == SET)
2439  {
2441  }
2442  if(pwrclkchanged == SET)
2443  {
2444  __HAL_RCC_PWR_CLK_DISABLE();
2445  }
2446 }
void HAL_PWR_DisableBkUpAccess(void)
Disable access to the backup domain (RTC registers, RTC backup data registers).
void HAL_PWR_EnableBkUpAccess(void)
Enable access to the backup domain (RTC registers, RTC backup data registers).
void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init)
Initialize the GPIOx peripheral according to the specified parameters in the GPIO_Init.
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))

◆ HAL_RCCEx_EnableLSECSS()

void HAL_RCCEx_EnableLSECSS ( void  )

Enable the LSE Clock Security System.

Note
Prior to enable the LSE Clock Security System, LSE oscillator is to be enabled with HAL_RCC_OscConfig() and the LSE oscillator clock is to be selected as RTC clock with HAL_RCCEx_PeriphCLKConfig().
Return values
None

Definition at line 2333 of file stm32l4xx_hal_rcc_ex.c.

2334 {
2335  SET_BIT(RCC->BDCR, RCC_BDCR_LSECSSON) ;
2336 }

◆ HAL_RCCEx_EnableLSECSS_IT()

void HAL_RCCEx_EnableLSECSS_IT ( void  )

Enable the LSE Clock Security System Interrupt & corresponding EXTI line.

Note
LSE Clock Security System Interrupt is mapped on RTC EXTI line 19
Return values
None

Definition at line 2356 of file stm32l4xx_hal_rcc_ex.c.

2357 {
2358  /* Enable LSE CSS */
2359  SET_BIT(RCC->BDCR, RCC_BDCR_LSECSSON) ;
2360 
2361  /* Enable LSE CSS IT */
2362  __HAL_RCC_ENABLE_IT(RCC_IT_LSECSS);
2363 
2364  /* Enable IT on EXTI Line 19 */
2365  __HAL_RCC_LSECSS_EXTI_ENABLE_IT();
2366  __HAL_RCC_LSECSS_EXTI_ENABLE_RISING_EDGE();
2367 }

◆ HAL_RCCEx_EnableMSIPLLMode()

void HAL_RCCEx_EnableMSIPLLMode ( void  )

Enable the PLL-mode of the MSI.

Note
Prior to enable the PLL-mode of the MSI for automatic hardware calibration LSE oscillator is to be enabled with HAL_RCC_OscConfig().
Return values
None

Definition at line 2490 of file stm32l4xx_hal_rcc_ex.c.

2491 {
2492  SET_BIT(RCC->CR, RCC_CR_MSIPLLEN) ;
2493 }

◆ HAL_RCCEx_EnablePLLSAI1()

HAL_StatusTypeDef HAL_RCCEx_EnablePLLSAI1 ( RCC_PLLSAI1InitTypeDef *  PLLSAI1Init)

Enable PLLSAI1.

Parameters
PLLSAI1Initpointer to an RCC_PLLSAI1InitTypeDef structure that contains the configuration information for the PLLSAI1
Return values
HALstatus

Definition at line 2056 of file stm32l4xx_hal_rcc_ex.c.

2057 {
2058  uint32_t tickstart;
2059  HAL_StatusTypeDef status = HAL_OK;
2060 
2061  /* check for PLLSAI1 Parameters used to output PLLSAI1CLK */
2062  assert_param(IS_RCC_PLLSAI1SOURCE(PLLSAI1Init->PLLSAI1Source));
2063  assert_param(IS_RCC_PLLSAI1M_VALUE(PLLSAI1Init->PLLSAI1M));
2064  assert_param(IS_RCC_PLLSAI1N_VALUE(PLLSAI1Init->PLLSAI1N));
2065  assert_param(IS_RCC_PLLSAI1P_VALUE(PLLSAI1Init->PLLSAI1P));
2066  assert_param(IS_RCC_PLLSAI1Q_VALUE(PLLSAI1Init->PLLSAI1Q));
2067  assert_param(IS_RCC_PLLSAI1R_VALUE(PLLSAI1Init->PLLSAI1R));
2068  assert_param(IS_RCC_PLLSAI1CLOCKOUT_VALUE(PLLSAI1Init->PLLSAI1ClockOut));
2069 
2070  /* Disable the PLLSAI1 */
2071  __HAL_RCC_PLLSAI1_DISABLE();
2072 
2073  /* Get Start Tick*/
2074  tickstart = HAL_GetTick();
2075 
2076  /* Wait till PLLSAI1 is ready to be updated */
2077  while(READ_BIT(RCC->CR, RCC_CR_PLLSAI1RDY) != 0U)
2078  {
2079  if((HAL_GetTick() - tickstart) > PLLSAI1_TIMEOUT_VALUE)
2080  {
2081  status = HAL_TIMEOUT;
2082  break;
2083  }
2084  }
2085 
2086  if(status == HAL_OK)
2087  {
2088 #if defined(RCC_PLLSAI1M_DIV_1_16_SUPPORT)
2089  /* Configure the PLLSAI1 Multiplication factor N */
2090  /* Configure the PLLSAI1 Division factors M, P, Q and R */
2091  __HAL_RCC_PLLSAI1_CONFIG(PLLSAI1Init->PLLSAI1M, PLLSAI1Init->PLLSAI1N, PLLSAI1Init->PLLSAI1P, PLLSAI1Init->PLLSAI1Q, PLLSAI1Init->PLLSAI1R);
2092 #else
2093  /* Configure the PLLSAI1 Multiplication factor N */
2094  /* Configure the PLLSAI1 Division factors P, Q and R */
2095  __HAL_RCC_PLLSAI1_CONFIG(PLLSAI1Init->PLLSAI1N, PLLSAI1Init->PLLSAI1P, PLLSAI1Init->PLLSAI1Q, PLLSAI1Init->PLLSAI1R);
2096 #endif /* RCC_PLLSAI1M_DIV_1_16_SUPPORT */
2097  /* Configure the PLLSAI1 Clock output(s) */
2098  __HAL_RCC_PLLSAI1CLKOUT_ENABLE(PLLSAI1Init->PLLSAI1ClockOut);
2099 
2100  /* Enable the PLLSAI1 again by setting PLLSAI1ON to 1*/
2101  __HAL_RCC_PLLSAI1_ENABLE();
2102 
2103  /* Get Start Tick*/
2104  tickstart = HAL_GetTick();
2105 
2106  /* Wait till PLLSAI1 is ready */
2107  while(READ_BIT(RCC->CR, RCC_CR_PLLSAI1RDY) == 0U)
2108  {
2109  if((HAL_GetTick() - tickstart) > PLLSAI1_TIMEOUT_VALUE)
2110  {
2111  status = HAL_TIMEOUT;
2112  break;
2113  }
2114  }
2115  }
2116 
2117  return status;
2118 }
uint32_t HAL_GetTick(void)
Provide a tick value in millisecond.
return HAL_OK
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))

◆ HAL_RCCEx_EnablePLLSAI2()

HAL_StatusTypeDef HAL_RCCEx_EnablePLLSAI2 ( RCC_PLLSAI2InitTypeDef PLLSAI2Init)

Enable PLLSAI2.

Parameters
PLLSAI2Initpointer to an RCC_PLLSAI2InitTypeDef structure that contains the configuration information for the PLLSAI2
Return values
HALstatus

Definition at line 2174 of file stm32l4xx_hal_rcc_ex.c.

2175 {
2176  uint32_t tickstart;
2177  HAL_StatusTypeDef status = HAL_OK;
2178 
2179  /* check for PLLSAI2 Parameters used to output PLLSAI2CLK */
2180  assert_param(IS_RCC_PLLSAI2SOURCE(PLLSAI2Init->PLLSAI2Source));
2181  assert_param(IS_RCC_PLLSAI2M_VALUE(PLLSAI2Init->PLLSAI2M));
2182  assert_param(IS_RCC_PLLSAI2N_VALUE(PLLSAI2Init->PLLSAI2N));
2183  assert_param(IS_RCC_PLLSAI2P_VALUE(PLLSAI2Init->PLLSAI2P));
2184 #if defined(RCC_PLLSAI2Q_DIV_SUPPORT)
2185  assert_param(IS_RCC_PLLSAI2Q_VALUE(PLLSAI2Init->PLLSAI2Q));
2186 #endif /* RCC_PLLSAI2Q_DIV_SUPPORT */
2187  assert_param(IS_RCC_PLLSAI2R_VALUE(PLLSAI2Init->PLLSAI2R));
2188  assert_param(IS_RCC_PLLSAI2CLOCKOUT_VALUE(PLLSAI2Init->PLLSAI2ClockOut));
2189 
2190  /* Disable the PLLSAI2 */
2191  __HAL_RCC_PLLSAI2_DISABLE();
2192 
2193  /* Get Start Tick*/
2194  tickstart = HAL_GetTick();
2195 
2196  /* Wait till PLLSAI2 is ready to be updated */
2197  while(READ_BIT(RCC->CR, RCC_CR_PLLSAI2RDY) != 0U)
2198  {
2199  if((HAL_GetTick() - tickstart) > PLLSAI2_TIMEOUT_VALUE)
2200  {
2201  status = HAL_TIMEOUT;
2202  break;
2203  }
2204  }
2205 
2206  if(status == HAL_OK)
2207  {
2208 #if defined(RCC_PLLSAI2M_DIV_1_16_SUPPORT) && defined(RCC_PLLSAI2Q_DIV_SUPPORT)
2209  /* Configure the PLLSAI2 Multiplication factor N */
2210  /* Configure the PLLSAI2 Division factors M, P, Q and R */
2211  __HAL_RCC_PLLSAI2_CONFIG(PLLSAI2Init->PLLSAI2M, PLLSAI2Init->PLLSAI2N, PLLSAI2Init->PLLSAI2P, PLLSAI2Init->PLLSAI2Q, PLLSAI2Init->PLLSAI2R);
2212 #elif defined(RCC_PLLSAI2M_DIV_1_16_SUPPORT)
2213  /* Configure the PLLSAI2 Multiplication factor N */
2214  /* Configure the PLLSAI2 Division factors M, P and R */
2215  __HAL_RCC_PLLSAI2_CONFIG(PLLSAI2Init->PLLSAI2M, PLLSAI2Init->PLLSAI2N, PLLSAI2Init->PLLSAI2P, PLLSAI2Init->PLLSAI2R);
2216 #elif defined(RCC_PLLSAI2Q_DIV_SUPPORT)
2217  /* Configure the PLLSAI2 Multiplication factor N */
2218  /* Configure the PLLSAI2 Division factors P, Q and R */
2219  __HAL_RCC_PLLSAI2_CONFIG(PLLSAI2Init->PLLSAI2N, PLLSAI2Init->PLLSAI2P, PLLSAI2Init->PLLSAI2Q, PLLSAI2Init->PLLSAI2R);
2220 #else
2221  /* Configure the PLLSAI2 Multiplication factor N */
2222  /* Configure the PLLSAI2 Division factors P and R */
2223  __HAL_RCC_PLLSAI2_CONFIG(PLLSAI2Init->PLLSAI2N, PLLSAI2Init->PLLSAI2P, PLLSAI2Init->PLLSAI2R);
2224 #endif /* RCC_PLLSAI2M_DIV_1_16_SUPPORT && RCC_PLLSAI2Q_DIV_SUPPORT */
2225  /* Configure the PLLSAI2 Clock output(s) */
2226  __HAL_RCC_PLLSAI2CLKOUT_ENABLE(PLLSAI2Init->PLLSAI2ClockOut);
2227 
2228  /* Enable the PLLSAI2 again by setting PLLSAI2ON to 1*/
2229  __HAL_RCC_PLLSAI2_ENABLE();
2230 
2231  /* Get Start Tick*/
2232  tickstart = HAL_GetTick();
2233 
2234  /* Wait till PLLSAI2 is ready */
2235  while(READ_BIT(RCC->CR, RCC_CR_PLLSAI2RDY) == 0U)
2236  {
2237  if((HAL_GetTick() - tickstart) > PLLSAI2_TIMEOUT_VALUE)
2238  {
2239  status = HAL_TIMEOUT;
2240  break;
2241  }
2242  }
2243  }
2244 
2245  return status;
2246 }
uint32_t HAL_GetTick(void)
Provide a tick value in millisecond.
return HAL_OK
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))

◆ HAL_RCCEx_LSECSS_Callback()

__weak void HAL_RCCEx_LSECSS_Callback ( void  )

RCCEx LSE Clock Security System interrupt callback.

Return values
none

Definition at line 2390 of file stm32l4xx_hal_rcc_ex.c.

2391 {
2392  /* NOTE : This function should not be modified, when the callback is needed,
2393  the @ref HAL_RCCEx_LSECSS_Callback should be implemented in the user file
2394  */
2395 }

◆ HAL_RCCEx_LSECSS_IRQHandler()

void HAL_RCCEx_LSECSS_IRQHandler ( void  )

Handle the RCC LSE Clock Security System interrupt request.

Return values
None

Definition at line 2373 of file stm32l4xx_hal_rcc_ex.c.

2374 {
2375  /* Check RCC LSE CSSF flag */
2376  if(__HAL_RCC_GET_IT(RCC_IT_LSECSS))
2377  {
2378  /* RCC LSE Clock Security System interrupt user callback */
2380 
2381  /* Clear RCC LSE CSS pending bit */
2382  __HAL_RCC_CLEAR_IT(RCC_IT_LSECSS);
2383  }
2384 }
void HAL_RCCEx_LSECSS_Callback(void)
RCCEx LSE Clock Security System interrupt callback.

◆ HAL_RCCEx_StandbyMSIRangeConfig()

void HAL_RCCEx_StandbyMSIRangeConfig ( uint32_t  MSIRange)

Configure the MSI range after standby mode.

Note
After Standby its frequency can be selected between 4 possible values (1, 2, 4 or 8 MHz).
Parameters
MSIRangeMSI range This parameter can be one of the following values:
  • RCC_MSIRANGE_4 Range 4 around 1 MHz
  • RCC_MSIRANGE_5 Range 5 around 2 MHz
  • RCC_MSIRANGE_6 Range 6 around 4 MHz (reset value)
  • RCC_MSIRANGE_7 Range 7 around 8 MHz
Return values
None

Definition at line 2319 of file stm32l4xx_hal_rcc_ex.c.

2320 {
2321  assert_param(IS_RCC_MSI_STANDBY_CLOCK_RANGE(MSIRange));
2322 
2323  __HAL_RCC_MSI_STANDBY_RANGE_CONFIG(MSIRange);
2324 }
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))

◆ HAL_RCCEx_WakeUpStopCLKConfig()

void HAL_RCCEx_WakeUpStopCLKConfig ( uint32_t  WakeUpClk)

Configure the oscillator clock source for wakeup from Stop and CSS backup clock.

Parameters
WakeUpClkWakeup clock This parameter can be one of the following values:
  • RCC_STOP_WAKEUPCLOCK_MSI MSI oscillator selection
  • RCC_STOP_WAKEUPCLOCK_HSI HSI oscillator selection
Note
This function shall not be called after the Clock Security System on HSE has been enabled.
Return values
None

Definition at line 2301 of file stm32l4xx_hal_rcc_ex.c.

2302 {
2303  assert_param(IS_RCC_STOP_WAKEUPCLOCK(WakeUpClk));
2304 
2305  __HAL_RCC_WAKEUPSTOP_CLK_CONFIG(WakeUpClk);
2306 }
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))