MG32F157 Standard Peripherals Firmware Library
Functions
MISC_Private_Functions

Functions

void NVIC_PriorityGroupConfig (uint32_t NVIC_PriorityGroup)
 Configures the priority grouping: pre-emption priority and subpriority. More...
 
void NVIC_Init (NVIC_InitTypeDef *NVIC_InitStruct)
 Initializes the NVIC peripheral according to the specified parameters in the NVIC_InitStruct. More...
 
void NVIC_SetVectorTable (uint32_t NVIC_VectTab, uint32_t Offset)
 Sets the vector table location and Offset. More...
 
void NVIC_SystemLPConfig (uint8_t LowPowerMode, FunctionalState NewState)
 Selects the condition for the system to enter low power mode. More...
 
void SysTick_CLKSourceConfig (uint32_t SysTick_CLKSource)
 Configures the SysTick clock source. More...
 
__WEAK void SysTick_DelayNticks (uint32_t n_ticks)
 Delay n ticks. More...
 
__WEAK void SysTick_Delay_Us (uint32_t nUs)
 Delay n Us. More...
 
__WEAK void SysTick_Delay_Ms (uint32_t nMs)
 Delay n Ms. More...
 

Detailed Description

Function Documentation

◆ NVIC_Init()

void NVIC_Init ( NVIC_InitTypeDef NVIC_InitStruct)

Initializes the NVIC peripheral according to the specified parameters in the NVIC_InitStruct.

Parameters
NVIC_InitStructpointer to a NVIC_InitTypeDef structure that contains the configuration information for the specified NVIC peripheral.
Returns
None

◆ NVIC_PriorityGroupConfig()

void NVIC_PriorityGroupConfig ( uint32_t  NVIC_PriorityGroup)

Configures the priority grouping: pre-emption priority and subpriority.

Parameters
NVIC_PriorityGroupspecifies the priority grouping bits length. This parameter can be one of the following values:
  • NVIC_PriorityGroup_0: 0 bits for pre-emption priority 4 bits for subpriority
  • NVIC_PriorityGroup_1: 1 bits for pre-emption priority 3 bits for subpriority
  • NVIC_PriorityGroup_2: 2 bits for pre-emption priority 2 bits for subpriority
  • NVIC_PriorityGroup_3: 3 bits for pre-emption priority 1 bits for subpriority
  • NVIC_PriorityGroup_4: 4 bits for pre-emption priority 0 bits for subpriority
Returns
None

◆ NVIC_SetVectorTable()

void NVIC_SetVectorTable ( uint32_t  NVIC_VectTab,
uint32_t  Offset 
)

Sets the vector table location and Offset.

Parameters
NVIC_VectTabspecifies if the vector table is in RAM or FLASH memory. This parameter can be one of the following values:
  • NVIC_VectTab_RAM
  • NVIC_VectTab_FLASH
OffsetVector Table base offset field. This value must be a multiple of 0x200.
Returns
None

◆ NVIC_SystemLPConfig()

void NVIC_SystemLPConfig ( uint8_t  LowPowerMode,
FunctionalState  NewState 
)

Selects the condition for the system to enter low power mode.

Parameters
LowPowerModeSpecifies the new mode for the system to enter low power mode. This parameter can be one of the following values:
  • NVIC_LP_SEVONPEND
  • NVIC_LP_SLEEPDEEP
  • NVIC_LP_SLEEPONEXIT
NewStatenew state of LP condition. This parameter can be: ENABLE or DISABLE.
Returns
None

◆ SysTick_CLKSourceConfig()

void SysTick_CLKSourceConfig ( uint32_t  SysTick_CLKSource)

Configures the SysTick clock source.

Parameters
SysTick_CLKSourcespecifies the SysTick clock source. This parameter can be one of the following values:
  • SysTick_CLKSource_HCLK_Div8: AHB clock divided by 8 selected as SysTick clock source.
  • SysTick_CLKSource_HCLK: AHB clock selected as SysTick clock source.
Returns
None

◆ SysTick_Delay_Ms()

__WEAK void SysTick_Delay_Ms ( uint32_t  nMs)

Delay n Ms.

Parameters
nMsNumber of Ms to delay.
Note
None
Returns
None

◆ SysTick_Delay_Us()

__WEAK void SysTick_Delay_Us ( uint32_t  nUs)

Delay n Us.

Parameters
nUsNumber of Us to delay.
Note
None
Returns
None

◆ SysTick_DelayNticks()

__WEAK void SysTick_DelayNticks ( uint32_t  n_ticks)

Delay n ticks.

Parameters
n_ticksNumber of ticks to delay.
Note
Since SysTick_LOAD is a 24-bit register, the n_ticks must be less than 16777216.
Returns
None