TUKS MCU Introductory course / TUKS-COURSE-THERMOMETER

Fork of TUKS-COURSE-TIMER by TUKS MCU Introductory course

Embed: (wiki syntax)

« Back to documentation index

UTILS Private functions

UTILS Private functions
[UTILS]

Functions

static uint32_t UTILS_GetPLLOutputFrequency (uint32_t PLL_InputFrequency, LL_UTILS_PLLInitTypeDef *UTILS_PLLInitStruct)
 Function to check that PLL can be modified.
static ErrorStatus UTILS_SetFlashLatency (uint32_t HCLK_Frequency)
 Update number of Flash wait states in line with new frequency and current voltage range.
static ErrorStatus UTILS_EnablePLLAndSwitchSystem (uint32_t SYSCLK_Frequency, LL_UTILS_ClkInitTypeDef *UTILS_ClkInitStruct)
 Function to enable PLL and switch system clock to PLL.
static ErrorStatus UTILS_PLL_IsBusy (void)
 Function to check that PLL can be modified.

Function Documentation

static ErrorStatus UTILS_EnablePLLAndSwitchSystem ( uint32_t  SYSCLK_Frequency,
LL_UTILS_ClkInitTypeDef UTILS_ClkInitStruct 
) [static]

Function to enable PLL and switch system clock to PLL.

Parameters:
SYSCLK_FrequencySYSCLK frequency
UTILS_ClkInitStructpointer to a LL_UTILS_ClkInitTypeDef structure that contains the configuration information for the BUS prescalers.
Return values:
AnErrorStatus enumeration value:

  • SUCCESS: No problem to switch system to PLL
  • ERROR: Problem to switch system to PLL

Definition at line 660 of file stm32l4xx_ll_utils.c.

static uint32_t UTILS_GetPLLOutputFrequency ( uint32_t  PLL_InputFrequency,
LL_UTILS_PLLInitTypeDef UTILS_PLLInitStruct 
) [static]

Function to check that PLL can be modified.

Parameters:
PLL_InputFrequencyPLL input frequency (in Hz)
UTILS_PLLInitStructpointer to a LL_UTILS_PLLInitTypeDef structure that contains the configuration information for the PLL.
Return values:
PLLoutput frequency (in Hz)

Definition at line 589 of file stm32l4xx_ll_utils.c.

static ErrorStatus UTILS_PLL_IsBusy ( void   ) [static]

Function to check that PLL can be modified.

Return values:
AnErrorStatus enumeration value:

  • SUCCESS: PLL modification can be done
  • ERROR: PLL is busy

Definition at line 620 of file stm32l4xx_ll_utils.c.

static ErrorStatus UTILS_SetFlashLatency ( uint32_t  HCLK_Frequency ) [static]

Update number of Flash wait states in line with new frequency and current voltage range.

Parameters:
HCLK_FrequencyHCLK frequency
Return values:
AnErrorStatus enumeration value:

  • SUCCESS: Latency has been modified
  • ERROR: Latency cannot be modified

Definition at line 507 of file stm32l4xx_ll_utils.c.