aboutsummaryrefslogtreecommitdiff
path: root/tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/NVIC/IRQ_Priority
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2017-01-25 22:24:18 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2017-01-25 22:29:25 +0100
commit40e04e3772726829d66c12e69f24b03920d79c67 (patch)
tree636811bad956798c9d5d22de9e7ba8c799b8d791 /tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/NVIC/IRQ_Priority
parent2fff65aed2477a503c72629d27e2a330d30c02d1 (diff)
downloadstm32f103-playground-40e04e3772726829d66c12e69f24b03920d79c67.tar.gz
stm32f103-playground-40e04e3772726829d66c12e69f24b03920d79c67.tar.bz2
stm32f103-playground-40e04e3772726829d66c12e69f24b03920d79c67.tar.xz
stm32f103-playground-40e04e3772726829d66c12e69f24b03920d79c67.zip
o Moving tinyprintf and stm libraries under thirdparty.
Diffstat (limited to 'tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/NVIC/IRQ_Priority')
-rw-r--r--tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/NVIC/IRQ_Priority/main.c172
-rw-r--r--tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/NVIC/IRQ_Priority/readme.txt144
-rw-r--r--tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/NVIC/IRQ_Priority/stm32f10x_conf.h77
-rw-r--r--tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/NVIC/IRQ_Priority/stm32f10x_it.h48
4 files changed, 0 insertions, 441 deletions
diff --git a/tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/NVIC/IRQ_Priority/main.c b/tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/NVIC/IRQ_Priority/main.c
deleted file mode 100644
index 33b3007..0000000
--- a/tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/NVIC/IRQ_Priority/main.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/**
- ******************************************************************************
- * @file NVIC/IRQ_Priority/main.c
- * @author MCD Application Team
- * @version V3.5.0
- * @date 08-April-2011
- * @brief Main program body
- ******************************************************************************
- * @attention
- *
- * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
- * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
- * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
- * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
- * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
- * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
- *
- * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
- ******************************************************************************
- */
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f10x.h"
-#include "stm32_eval.h"
-
-/** @addtogroup STM32F10x_StdPeriph_Examples
- * @{
- */
-
-/** @addtogroup IRQ_Priority
- * @{
- */
-
-/* Private typedef -----------------------------------------------------------*/
-/* Private define ------------------------------------------------------------*/
-/* Private macro -------------------------------------------------------------*/
-/* Private variables ---------------------------------------------------------*/
-__IO uint8_t PreemptionOccured = 0;
-__IO uint8_t PreemptionPriorityValue = 0;
-
-/* Private function prototypes -----------------------------------------------*/
-void NVIC_Config(void);
-void Delay(__IO uint32_t nCount);
-
-/* Private functions ---------------------------------------------------------*/
-
-/**
- * @brief Main program.
- * @param None
- * @retval None
- */
-int main(void)
-{
- /*!< At this stage the microcontroller clock setting is already configured,
- this is done through SystemInit() function which is called from startup
- file (startup_stm32f10x_xx.s) before to branch to application main.
- To reconfigure the default setting of SystemInit() function, refer to
- system_stm32f10x.c file
- */
-
- /* NVIC configuration ------------------------------------------------------*/
- NVIC_Config();
-
- /* Initialize LED1..LED4, Key and Sel Joystick Buttons mounted on STM3210X-EVAL
- board */
- STM_EVAL_LEDInit(LED1);
- STM_EVAL_LEDInit(LED2);
- STM_EVAL_LEDInit(LED3);
- STM_EVAL_LEDInit(LED4);
- STM_EVAL_PBInit(BUTTON_KEY, BUTTON_MODE_EXTI);
- STM_EVAL_PBInit(BUTTON_WAKEUP, BUTTON_MODE_EXTI);
-
- /* Configure the SysTick Handler Priority: Preemption priority and subpriority */
- NVIC_SetPriority(SysTick_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(), !PreemptionPriorityValue, 0));
-
- while (1)
- {
- if(PreemptionOccured != 0)
- {
- /* Toggel The lED1 */
- STM_EVAL_LEDToggle(LED1);
-
- /* Insert delay Time */
- Delay(0x5FFFF);
-
- STM_EVAL_LEDToggle(LED2);
-
- Delay(0x5FFFF);
-
- STM_EVAL_LEDToggle(LED3);
-
- Delay(0x5FFFF);
-
- STM_EVAL_LEDToggle(LED4);
-
- Delay(0x5FFFF);
- }
- }
-}
-
-/**
- * @brief Configures the NVIC interrupts.
- * @param None
- * @retval None
- */
-void NVIC_Config(void)
-{
- NVIC_InitTypeDef NVIC_InitStructure;
-
- /* Configure the preemption priority and subpriority:
- - 1 bits for pre-emption priority: possible value are 0 or 1
- - 3 bits for subpriority: possible value are 0..7
- - Lower values gives higher priority
- */
- NVIC_PriorityGroupConfig(NVIC_PriorityGroup_1);
-
- /* Enable the WAKEUP_BUTTON_EXTI_IRQn Interrupt */
- NVIC_InitStructure.NVIC_IRQChannel = WAKEUP_BUTTON_EXTI_IRQn;
- NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = PreemptionPriorityValue;
- NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
- NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
- NVIC_Init(&NVIC_InitStructure);
-
- /* Enable the KEY_BUTTON_EXTI_IRQn Interrupt */
- NVIC_InitStructure.NVIC_IRQChannel = KEY_BUTTON_EXTI_IRQn;
- NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
- NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
- NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
- NVIC_Init(&NVIC_InitStructure);
-}
-
-/**
- * @brief Inserts a delay time.
- * @param nCount: specifies the delay time length.
- * @retval None
- */
-void Delay(__IO uint32_t nCount)
-{
- for(; nCount != 0; nCount--);
-}
-
-#ifdef USE_FULL_ASSERT
-
-/**
- * @brief Reports the name of the source file and the source line number
- * where the assert_param error has occurred.
- * @param file: pointer to the source file name
- * @param line: assert_param error line source number
- * @retval None
- */
-void assert_failed(uint8_t* file, uint32_t line)
-{
- /* User can add his own implementation to report the file name and line number,
- ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
-
- /* Infinite loop */
- while (1)
- {
- }
-}
-
-#endif
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
diff --git a/tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/NVIC/IRQ_Priority/readme.txt b/tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/NVIC/IRQ_Priority/readme.txt
deleted file mode 100644
index cd86c9b..0000000
--- a/tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/NVIC/IRQ_Priority/readme.txt
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- @page NVIC_IRQ_Priority NVIC IRQ Priority example
-
- @verbatim
- ******************** (C) COPYRIGHT 2011 STMicroelectronics *******************
- * @file NVIC/IRQ_Priority/readme.txt
- * @author MCD Application Team
- * @version V3.5.0
- * @date 08-April-2011
- * @brief Description of the NVIC IRQ Priority example.
- ******************************************************************************
- * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
- * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
- * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
- * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
- * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
- * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
- ******************************************************************************
- @endverbatim
-
-@par Example Description
-
-This example demonstrates the use of the Nested Vectored Interrupt Controller (NVIC):
-
-- Configuration of 2 EXTI Lines (Wakeup button EXTI Line & Key button EXTI Line)
- to generate an interrupt on each falling edge and use the SysTick interrupt.
-- These interrupts are configured with the following parameters:
- - Wakeup button EXTI Line:
- - PreemptionPriority = PreemptionPriorityValue
- - SubPriority = 0
- - Key button EXTI Line:
- - PreemptionPriority = 0
- - SubPriority = 1
- - SysTick Handler:
- - PreemptionPriority = !PreemptionPriorityValue
- - SubPriority = 0
-First, the PreemptionPriorityValue is equal to 0, the Wakeup button EXTI Line
-has higher preemption priority than the SysTick handler.
-
-In the key button EXTI Line interrupt routine the Wakeup button EXTI Line and
-SysTick preemption priorities are inverted.
-In the Wakeup button EXTI Line interrupt routine the pending bit of the SysTick
-interrupt is set this will cause SysTick ISR to preempt the Wakeup button EXTI
-Line ISR only if it has higher preemption priority.
-
-The system behaves as following:
-
-1) The first time Key button EXTI Line interrupt occurs the SysTick preemption
-become higher than Wakeup button EXTI Line one. So when the Wakeup button EXTI
-Line interrupt occurs, the SysTick ISR is executed and the PreemptionOccured
-variable become TRUE and the four leds (LED1, LED2, LED3, LED4) start toggling.
-
-2) When the next Key button EXTI Line interrupt occurs the SysTick preemption
-become lower than Wakeup button EXTI Line one. So when the Wakeup button EXTI Line
-interrupt occurs, the PreemptionOccured variable became FALSE and the four leds
-(LED1, LED2, LED3, LED4) stop toggling.
-
-Then this behavior is repeated from point 1) in an infinite loop.
-
-
-@par Directory contents
-
- - NVIC/IRQ_Priority/stm32f10x_conf.h Library Configuration file
- - NVIC/IRQ_Priority/stm32f10x_it.c Interrupt handlers
- - NVIC/IRQ_Priority/stm32f10x_it.h Interrupt handlers header file
- - NVIC/IRQ_Priority/main.c Main program
- - NVIC/IRQ_Priority/system_stm32f10x.c STM32F10x system source file
-
-@par Hardware and Software environment
-
- - This example runs on STM32F10x Connectivity line, High-Density, High-Density
- Value line, Medium-Density, XL-Density, Medium-Density Value line, Low-Density
- and Low-Density Value line Devices.
-
- - This example has been tested with STMicroelectronics STM32100E-EVAL (High-Density
- Value line), STM32100B-EVAL (Medium-Density Value line), STM3210C-EVAL (Connectivity line),
- STM3210E-EVAL (High-Density and XL-Density) and STM3210B-EVAL (Medium-Density)
- evaluation boards and can be easily tailored to any other supported device
- and development board.
- To select the STMicroelectronics evaluation board used to run the example,
- uncomment the corresponding line in stm32_eval.h file (under Utilities\STM32_EVAL)
-
- - STM32100E-EVAL Set-up
- - Use LED1, LED2, LED3 and LED4 connected respectively to PF.06, PF0.7, PF.08
- and PF.09 pins
- - Use the Key push-button connected to pin PG.08 (EXTI Line8).
- - Use the Wakeup push-button connected to pin PA.00 (EXTI Line0).
- @note the jumper JP4 must be not fit to be able to use the Wakeup push-button
-
- - STM32100B-EVAL Set-up
- - Use LED1, LED2, LED3 and LED4 connected respectively to PC.06, PC.07, PC.08
- and PC.09 pins
- - Use the Key push-button connected to pin PB.09 (EXTI Line9).
- - Use the Wakeup push-button connected to pin PA.00 (EXTI Line0).
-
- - STM3210C-EVAL Set-up
- - Use LED1, LED2, LED3 and LED4 connected respectively to PD.07, PD.13, PF.03
- and PD.04 pins
- - Use the Key push-button connected to pin PB.09 (EXTI Line9).
- - Use the Wakeup push-button connected to pin PA.00 (EXTI Line0). Make sure
- that the Jumper 14 is in position 2<->3.
-
- - STM3210E-EVAL Set-up
- - Use LED1, LED2, LED3 and LED4 connected respectively to PF.06, PF0.7, PF.08
- and PF.09 pins
- - Use the Key push-button connected to pin PG.08 (EXTI Line8).
- - Use the Wakeup push-button connected to pin PA.00 (EXTI Line0).
- @note the jumper JP4 must be not fit to be able to use the Wakeup push-button
-
- - STM3210B-EVAL Set-up
- - Use LED1, LED2, LED3 and LED4 connected respectively to PC.06, PC.07, PC.08
- and PC.09 pins
- - Use the Key push-button connected to pin PB.09 (EXTI Line9).
- - Use the Wakeup push-button connected to pin PA.00 (EXTI Line0).
-
-
-@par How to use it ?
-
-In order to make the program work, you must do the following :
- - Copy all source files from this example folder to the template folder under
- Project\STM32F10x_StdPeriph_Template
- - Open your preferred toolchain
- - Rebuild all files and load your image into target memory
- - Run the example
-
-@note
- - Low-density Value line devices are STM32F100xx microcontrollers where the
- Flash memory density ranges between 16 and 32 Kbytes.
- - Low-density devices are STM32F101xx, STM32F102xx and STM32F103xx
- microcontrollers where the Flash memory density ranges between 16 and 32 Kbytes.
- - Medium-density Value line devices are STM32F100xx microcontrollers where
- the Flash memory density ranges between 64 and 128 Kbytes.
- - Medium-density devices are STM32F101xx, STM32F102xx and STM32F103xx
- microcontrollers where the Flash memory density ranges between 64 and 128 Kbytes.
- - High-density Value line devices are STM32F100xx microcontrollers where
- the Flash memory density ranges between 256 and 512 Kbytes.
- - High-density devices are STM32F101xx and STM32F103xx microcontrollers where
- the Flash memory density ranges between 256 and 512 Kbytes.
- - XL-density devices are STM32F101xx and STM32F103xx microcontrollers where
- the Flash memory density ranges between 512 and 1024 Kbytes.
- - Connectivity line devices are STM32F105xx and STM32F107xx microcontrollers.
-
- * <h3><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h3>
- */
diff --git a/tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/NVIC/IRQ_Priority/stm32f10x_conf.h b/tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/NVIC/IRQ_Priority/stm32f10x_conf.h
deleted file mode 100644
index 0566ac2..0000000
--- a/tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/NVIC/IRQ_Priority/stm32f10x_conf.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- ******************************************************************************
- * @file NVIC/IRQ_Priority/stm32f10x_conf.h
- * @author MCD Application Team
- * @version V3.5.0
- * @date 08-April-2011
- * @brief Library configuration file.
- ******************************************************************************
- * @attention
- *
- * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
- * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
- * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
- * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
- * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
- * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
- *
- * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
- ******************************************************************************
- */
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __STM32F10x_CONF_H
-#define __STM32F10x_CONF_H
-
-/* Includes ------------------------------------------------------------------*/
-/* Uncomment/Comment the line below to enable/disable peripheral header file inclusion */
-#include "stm32f10x_adc.h"
-#include "stm32f10x_bkp.h"
-#include "stm32f10x_can.h"
-#include "stm32f10x_cec.h"
-#include "stm32f10x_crc.h"
-#include "stm32f10x_dac.h"
-#include "stm32f10x_dbgmcu.h"
-#include "stm32f10x_dma.h"
-#include "stm32f10x_exti.h"
-#include "stm32f10x_flash.h"
-#include "stm32f10x_fsmc.h"
-#include "stm32f10x_gpio.h"
-#include "stm32f10x_i2c.h"
-#include "stm32f10x_iwdg.h"
-#include "stm32f10x_pwr.h"
-#include "stm32f10x_rcc.h"
-#include "stm32f10x_rtc.h"
-#include "stm32f10x_sdio.h"
-#include "stm32f10x_spi.h"
-#include "stm32f10x_tim.h"
-#include "stm32f10x_usart.h"
-#include "stm32f10x_wwdg.h"
-#include "misc.h" /* High level functions for NVIC and SysTick (add-on to CMSIS functions) */
-
-/* Exported types ------------------------------------------------------------*/
-/* Exported constants --------------------------------------------------------*/
-/* Uncomment the line below to expanse the "assert_param" macro in the
- Standard Peripheral Library drivers code */
-/* #define USE_FULL_ASSERT 1 */
-
-/* Exported macro ------------------------------------------------------------*/
-#ifdef USE_FULL_ASSERT
-
-/**
- * @brief The assert_param macro is used for function's parameters check.
- * @param expr: If expr is false, it calls assert_failed function which reports
- * the name of the source file and the source line number of the call
- * that failed. If expr is true, it returns no value.
- * @retval None
- */
- #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
-/* Exported functions ------------------------------------------------------- */
- void assert_failed(uint8_t* file, uint32_t line);
-#else
- #define assert_param(expr) ((void)0)
-#endif /* USE_FULL_ASSERT */
-
-#endif /* __STM32F10x_CONF_H */
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
diff --git a/tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/NVIC/IRQ_Priority/stm32f10x_it.h b/tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/NVIC/IRQ_Priority/stm32f10x_it.h
deleted file mode 100644
index a3a3aff..0000000
--- a/tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/NVIC/IRQ_Priority/stm32f10x_it.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- ******************************************************************************
- * @file NVIC/IRQ_Priority/stm32f10x_it.h
- * @author MCD Application Team
- * @version V3.5.0
- * @date 08-April-2011
- * @brief This file contains the headers of the interrupt handlers.
- ******************************************************************************
- * @attention
- *
- * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
- * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
- * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
- * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
- * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
- * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
- *
- * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
- ******************************************************************************
- */
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __STM32F10x_IT_H
-#define __STM32F10x_IT_H
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f10x.h"
-
-/* Exported types ------------------------------------------------------------*/
-/* Exported constants --------------------------------------------------------*/
-/* Exported macro ------------------------------------------------------------*/
-/* Exported functions ------------------------------------------------------- */
-
-void NMI_Handler(void);
-void HardFault_Handler(void);
-void MemManage_Handler(void);
-void BusFault_Handler(void);
-void UsageFault_Handler(void);
-void SVC_Handler(void);
-void DebugMon_Handler(void);
-void PendSV_Handler(void);
-void SysTick_Handler(void);
-void EXTI0_IRQHandler(void);
-void EXTI9_5_IRQHandler(void);
-
-#endif /* __STM32F10x_IT_H */
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/