STM32F30x_StdPeriph_Driver

Classes

struct  ADC_InjectedInitTypeDef
 ADC Init structure definition. More...

Modules

 ADC
 

ADC driver modules.


 CAN
 

CAN driver modules.


 COMP
 

COMP driver modules.


 CRC
 

CRC driver modules.


 DAC
 

DAC driver modules.


 DBGMCU
 

DBGMCU driver modules.


 DMA
 

DMA driver modules.


 EXTI
 

EXTI driver modules.


 FLASH
 

FLASH driver modules.


 GPIO
 

GPIO driver modules.


 I2C
 

I2C driver modules.


 IWDG
 

IWDG driver modules.


 MISC
 

MISC driver modules.


 OPAMP
 

OPAMP driver modules.


 PWR
 

PWR driver modules.


 RCC
 

RCC driver modules.


 RTC
 

RTC driver modules.


 SPI
 

SPI driver modules.


 SYSCFG
 

SYSCFG driver modules.


 USART
 

USART driver modules.


 WWDG
 

WWDG driver modules.


Functions

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

Variables

uint32_t RCC_ClocksTypeDef::HCLK_Frequency
uint32_t RCC_ClocksTypeDef::PCLK1_Frequency
uint32_t RCC_ClocksTypeDef::PCLK2_Frequency
uint32_t RCC_ClocksTypeDef::ADC12CLK_Frequency
uint32_t RCC_ClocksTypeDef::ADC34CLK_Frequency
uint32_t RCC_ClocksTypeDef::I2C1CLK_Frequency
uint32_t RCC_ClocksTypeDef::I2C2CLK_Frequency
uint32_t RCC_ClocksTypeDef::TIM1CLK_Frequency
uint32_t RCC_ClocksTypeDef::TIM8CLK_Frequency
uint32_t RCC_ClocksTypeDef::USART1CLK_Frequency
uint32_t RCC_ClocksTypeDef::USART2CLK_Frequency
uint32_t RCC_ClocksTypeDef::USART3CLK_Frequency
uint32_t RCC_ClocksTypeDef::UART4CLK_Frequency
uint32_t RCC_ClocksTypeDef::UART5CLK_Frequency

Detailed Description

< Includes ----------------------------------------------------------------

< Define to prevent recursive inclusion -----------------------------------

< Includes ----------------------------------------------------------------


Function Documentation

void NVIC_Init ( NVIC_InitTypeDef NVIC_InitStruct  ) 

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

Note:
To configure interrupts priority correctly, the NVIC_PriorityGroupConfig() function should be called before.
Parameters:
NVIC_InitStruct,: pointer to a NVIC_InitTypeDef structure that contains the configuration information for the specified NVIC peripheral.
Return values:
None 

Definition at line 118 of file stm32f30x_misc.c.

00119 {
00120   uint32_t tmppriority = 0x00, tmppre = 0x00, tmpsub = 0x0F;
00121   
00122   /* Check the parameters */
00123   assert_param(IS_FUNCTIONAL_STATE(NVIC_InitStruct->NVIC_IRQChannelCmd));
00124   assert_param(IS_NVIC_PREEMPTION_PRIORITY(NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority));  
00125   assert_param(IS_NVIC_SUB_PRIORITY(NVIC_InitStruct->NVIC_IRQChannelSubPriority));
00126     
00127   if (NVIC_InitStruct->NVIC_IRQChannelCmd != DISABLE)
00128   {
00129     /* Compute the Corresponding IRQ Priority --------------------------------*/    
00130     tmppriority = (0x700 - ((SCB->AIRCR) & (uint32_t)0x700))>> 0x08;
00131     tmppre = (0x4 - tmppriority);
00132     tmpsub = tmpsub >> tmppriority;
00133 
00134     tmppriority = (uint32_t)NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority << tmppre;
00135     tmppriority |=  NVIC_InitStruct->NVIC_IRQChannelSubPriority & tmpsub;
00136     tmppriority = tmppriority << 0x04;
00137         
00138     NVIC->IP[NVIC_InitStruct->NVIC_IRQChannel] = tmppriority;
00139     
00140     /* Enable the Selected IRQ Channels --------------------------------------*/
00141     NVIC->ISER[NVIC_InitStruct->NVIC_IRQChannel >> 0x05] =
00142       (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F);
00143   }
00144   else
00145   {
00146     /* Disable the Selected IRQ Channels -------------------------------------*/
00147     NVIC->ICER[NVIC_InitStruct->NVIC_IRQChannel >> 0x05] =
00148       (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F);
00149   }
00150 }

void NVIC_PriorityGroupConfig ( uint32_t  NVIC_PriorityGroup  ) 

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

Parameters:
NVIC_PriorityGroup,: specifies 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.
Note:
When NVIC_PriorityGroup_0 is selected, it will no be any nested interrupt. This interrupts priority is managed only with subpriority.
Return values:
None 

Definition at line 100 of file stm32f30x_misc.c.

00101 {
00102   /* Check the parameters */
00103   assert_param(IS_NVIC_PRIORITY_GROUP(NVIC_PriorityGroup));
00104   
00105   /* Set the PRIGROUP[10:8] bits according to NVIC_PriorityGroup value */
00106   SCB->AIRCR = AIRCR_VECTKEY_MASK | NVIC_PriorityGroup;
00107 }

void NVIC_SetVectorTable ( uint32_t  NVIC_VectTab,
uint32_t  Offset 
)

Sets the vector table location and Offset.

Parameters:
NVIC_VectTab,: specifies 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
Offset,: Vector Table base offset field. This value must be a multiple of 0x200.
Return values:
None 

Definition at line 161 of file stm32f30x_misc.c.

00162 { 
00163   /* Check the parameters */
00164   assert_param(IS_NVIC_VECTTAB(NVIC_VectTab));
00165   assert_param(IS_NVIC_OFFSET(Offset));  
00166    
00167   SCB->VTOR = NVIC_VectTab | (Offset & (uint32_t)0x1FFFFF80);
00168 }

void NVIC_SystemLPConfig ( uint8_t  LowPowerMode,
FunctionalState  NewState 
)

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

Parameters:
LowPowerMode,: Specifies 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
NewState,: new state of LP condition. This parameter can be: ENABLE or DISABLE.
Return values:
None 

Definition at line 180 of file stm32f30x_misc.c.

00181 {
00182   /* Check the parameters */
00183   assert_param(IS_NVIC_LP(LowPowerMode));
00184   assert_param(IS_FUNCTIONAL_STATE(NewState));  
00185   
00186   if (NewState != DISABLE)
00187   {
00188     SCB->SCR |= LowPowerMode;
00189   }
00190   else
00191   {
00192     SCB->SCR &= (uint32_t)(~(uint32_t)LowPowerMode);
00193   }
00194 }

void SysTick_CLKSourceConfig ( uint32_t  SysTick_CLKSource  ) 

Configures the SysTick clock source.

Parameters:
SysTick_CLKSource,: specifies 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.
Return values:
None 

Definition at line 204 of file stm32f30x_misc.c.

00205 {
00206   /* Check the parameters */
00207   assert_param(IS_SYSTICK_CLK_SOURCE(SysTick_CLKSource));
00208   if (SysTick_CLKSource == SysTick_CLKSource_HCLK)
00209   {
00210     SysTick->CTRL |= SysTick_CLKSource_HCLK;
00211   }
00212   else
00213   {
00214     SysTick->CTRL &= SysTick_CLKSource_HCLK_Div8;
00215   }
00216 }

 All Classes Files Functions Variables Enumerations Enumerator Defines

Generated on 12 Dec 2012 for f3dox by  doxygen 1.6.1