STM32F4 Standard Peripheral bibliotheek  1.0
ST Microelectronics bibliotheek documentatie voor de STM32F4 Standard Peripheral Library
 All Data Structures Files Functions Variables Enumerations Enumerator Groups
misc.c File Reference

This file provides all the miscellaneous firmware functions (add-on to CMSIS functions). More...

#include "misc.h"

Macros

#define AIRCR_VECTKEY_MASK   ((uint32_t)0x05FA0000)
 

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...
 

Detailed Description

This file provides all the miscellaneous firmware functions (add-on to CMSIS functions).

Author
MCD Application Team
Version
V1.0.2
Date
05-March-2012
*                               
*          ===================================================================      
*                        How to configure Interrupts using driver 
*          ===================================================================      
* 
*            This section provide functions allowing to configure the NVIC interrupts (IRQ).
*            The Cortex-M4 exceptions are managed by CMSIS functions.
*
*            1. Configure the NVIC Priority Grouping using NVIC_PriorityGroupConfig()
*                function according to the following table.

*  The table below gives the allowed values of the pre-emption priority and subpriority according
*  to the Priority Grouping configuration performed by NVIC_PriorityGroupConfig function
*    ==========================================================================================================================
*      NVIC_PriorityGroup   | NVIC_IRQChannelPreemptionPriority | NVIC_IRQChannelSubPriority  |       Description
*    ==========================================================================================================================
*     NVIC_PriorityGroup_0  |                0                  |            0-15             | 0 bits for pre-emption priority
*                           |                                   |                             | 4 bits for subpriority
*    --------------------------------------------------------------------------------------------------------------------------
*     NVIC_PriorityGroup_1  |                0-1                |            0-7              | 1 bits for pre-emption priority
*                           |                                   |                             | 3 bits for subpriority
*    --------------------------------------------------------------------------------------------------------------------------    
*     NVIC_PriorityGroup_2  |                0-3                |            0-3              | 2 bits for pre-emption priority
*                           |                                   |                             | 2 bits for subpriority
*    --------------------------------------------------------------------------------------------------------------------------    
*     NVIC_PriorityGroup_3  |                0-7                |            0-1              | 3 bits for pre-emption priority
*                           |                                   |                             | 1 bits for subpriority
*    --------------------------------------------------------------------------------------------------------------------------    
*     NVIC_PriorityGroup_4  |                0-15               |            0                | 4 bits for pre-emption priority
*                           |                                   |                             | 0 bits for subpriority                       
*    ==========================================================================================================================     
*
*            2. Enable and Configure the priority of the selected IRQ Channels using NVIC_Init()  
*
* @note  When the NVIC_PriorityGroup_0 is selected, IRQ pre-emption is no more possible. 
*        The pending IRQ priority will be managed only by the subpriority.
*
* @note  IRQ priority order (sorted by highest to lowest priority):
*         - Lowest pre-emption priority
*         - Lowest subpriority
*         - Lowest hardware priority (IRQ number)
*
*  
Attention

© COPYRIGHT 2012 STMicroelectronics

Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at:

   http://www.st.com/software_license_agreement_liberty_v2

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.