From a8aaabae4c1cc64a01d740a436336ca31c1f79ba Mon Sep 17 00:00:00 2001 From: iperry Date: Thu, 17 Dec 2009 02:46:08 +0000 Subject: removed extraneous files, stm32lib examples git-svn-id: https://leaflabs.googlecode.com/svn/trunk/library@70 749a229e-a60e-11de-b98f-4500b42dc123 --- src/stm32lib/examples/PWR/STANDBY/main.c | 311 -------- .../examples/PWR/STANDBY/platform_config.h | 56 -- src/stm32lib/examples/PWR/STANDBY/readme.txt | 97 --- src/stm32lib/examples/PWR/STANDBY/stm32f10x_conf.h | 170 ----- src/stm32lib/examples/PWR/STANDBY/stm32f10x_it.c | 833 -------------------- src/stm32lib/examples/PWR/STANDBY/stm32f10x_it.h | 100 --- src/stm32lib/examples/PWR/STOP/main.c | 391 ---------- src/stm32lib/examples/PWR/STOP/platform_config.h | 56 -- src/stm32lib/examples/PWR/STOP/readme.txt | 95 --- src/stm32lib/examples/PWR/STOP/stm32f10x_conf.h | 170 ----- src/stm32lib/examples/PWR/STOP/stm32f10x_it.c | 844 --------------------- src/stm32lib/examples/PWR/STOP/stm32f10x_it.h | 100 --- 12 files changed, 3223 deletions(-) delete mode 100755 src/stm32lib/examples/PWR/STANDBY/main.c delete mode 100755 src/stm32lib/examples/PWR/STANDBY/platform_config.h delete mode 100755 src/stm32lib/examples/PWR/STANDBY/readme.txt delete mode 100755 src/stm32lib/examples/PWR/STANDBY/stm32f10x_conf.h delete mode 100755 src/stm32lib/examples/PWR/STANDBY/stm32f10x_it.c delete mode 100755 src/stm32lib/examples/PWR/STANDBY/stm32f10x_it.h delete mode 100755 src/stm32lib/examples/PWR/STOP/main.c delete mode 100755 src/stm32lib/examples/PWR/STOP/platform_config.h delete mode 100755 src/stm32lib/examples/PWR/STOP/readme.txt delete mode 100755 src/stm32lib/examples/PWR/STOP/stm32f10x_conf.h delete mode 100755 src/stm32lib/examples/PWR/STOP/stm32f10x_it.c delete mode 100755 src/stm32lib/examples/PWR/STOP/stm32f10x_it.h (limited to 'src/stm32lib/examples/PWR') diff --git a/src/stm32lib/examples/PWR/STANDBY/main.c b/src/stm32lib/examples/PWR/STANDBY/main.c deleted file mode 100755 index a4fbc16..0000000 --- a/src/stm32lib/examples/PWR/STANDBY/main.c +++ /dev/null @@ -1,311 +0,0 @@ -/******************** (C) COPYRIGHT 2008 STMicroelectronics ******************** -* File Name : main.c -* Author : MCD Application Team -* Version : V2.0.1 -* Date : 06/13/2008 -* Description : Main program body. -******************************************************************************** -* 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. -*******************************************************************************/ - -/* Includes ------------------------------------------------------------------*/ -#include "stm32f10x_lib.h" -#include "platform_config.h" - -/* Private typedef -----------------------------------------------------------*/ -/* Private define ------------------------------------------------------------*/ -/* Private macro -------------------------------------------------------------*/ -/* Private variables ---------------------------------------------------------*/ -ErrorStatus HSEStartUpStatus; - -/* Private function prototypes -----------------------------------------------*/ -void RCC_Configuration(void); -void GPIO_Configuration(void); -void EXTI_Configuration(void); -void RTC_Configuration(void); -void NVIC_Configuration(void); -void SysTick_Configuration(void); - -/* Private functions ---------------------------------------------------------*/ -/******************************************************************************* -* Function Name : main -* Description : Main program. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -int main(void) -{ -#ifdef DEBUG - debug(); -#endif - - /* System Clocks Configuration */ - RCC_Configuration(); - - /* GPIO configuration */ - GPIO_Configuration(); - - /* Turn on led connected to GPIO_LED Pin6 */ - GPIO_SetBits(GPIO_LED, GPIO_Pin_6); - - /* Enable PWR and BKP clock */ - RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR | RCC_APB1Periph_BKP, ENABLE); - - /* Enable WKUP pin */ - PWR_WakeUpPinCmd(ENABLE); - - /* Allow access to BKP Domain */ - PWR_BackupAccessCmd(ENABLE); - - /* Configure RTC clock source and prescaler */ - RTC_Configuration(); - - /* Configure EXTI Line to generate an interrupt on falling edge */ - EXTI_Configuration(); - - /* NVIC configuration */ - NVIC_Configuration(); - - /* Configure the SysTick to generate an interrupt each 250 ms */ - SysTick_Configuration(); - - while (1) - { - } -} - -/******************************************************************************* -* Function Name : RCC_Configuration -* Description : Configures the different system clocks. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void RCC_Configuration(void) -{ - /* RCC system reset(for debug purpose) */ - RCC_DeInit(); - - /* Enable HSE */ - RCC_HSEConfig(RCC_HSE_ON); - - /* Wait till HSE is ready */ - HSEStartUpStatus = RCC_WaitForHSEStartUp(); - - if(HSEStartUpStatus == SUCCESS) - { - /* Enable Prefetch Buffer */ - FLASH_PrefetchBufferCmd(FLASH_PrefetchBuffer_Enable); - - /* Flash 2 wait state */ - FLASH_SetLatency(FLASH_Latency_2); - - /* HCLK = SYSCLK */ - RCC_HCLKConfig(RCC_SYSCLK_Div1); - - /* PCLK2 = HCLK */ - RCC_PCLK2Config(RCC_HCLK_Div1); - - /* PCLK1 = HCLK/2 */ - RCC_PCLK1Config(RCC_HCLK_Div2); - - /* PLLCLK = 8MHz * 9 = 72 MHz */ - RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_9); - - /* Enable PLL */ - RCC_PLLCmd(ENABLE); - - /* Wait till PLL is ready */ - while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET) - { - } - - /* Select PLL as system clock source */ - RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK); - - /* Wait till PLL is used as system clock source */ - while(RCC_GetSYSCLKSource() != 0x08) - { - } - } -} - -/******************************************************************************* -* Function Name : GPIO_Configuration -* Description : Configures the different GPIO ports. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void GPIO_Configuration(void) -{ - GPIO_InitTypeDef GPIO_InitStructure; - - /* Enable Key Button GPIO Port, GPIO_LED and AFIO clock */ - RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIO_KEY_BUTTON | RCC_APB2Periph_GPIO_LED - | RCC_APB2Periph_AFIO, ENABLE); - - /* Configure GPIO_LED Pin 6 and Pin 7 as Output push-pull */ - GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6 | GPIO_Pin_7; - GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; - GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; - GPIO_Init(GPIO_LED, &GPIO_InitStructure); - - /* Configure Key Button GPIO Pin as input floating */ - GPIO_InitStructure.GPIO_Pin = GPIO_PIN_KEY_BUTTON; - GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING; - GPIO_Init(GPIO_KEY_BUTTON, &GPIO_InitStructure); -} - -/******************************************************************************* -* Function Name : EXTI_Configuration -* Description : Configures EXTI Line. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void EXTI_Configuration(void) -{ - EXTI_InitTypeDef EXTI_InitStructure; - - /* Connect Key Button EXTI Line to Key Button GPIO Pin */ - GPIO_EXTILineConfig(GPIO_PORT_SOURCE_KEY_BUTTON, GPIO_PIN_SOURCE_KEY_BUTTON); - - /* Configure Key Button EXTI Line to generate an interrupt on falling edge */ - EXTI_InitStructure.EXTI_Line = EXTI_LINE_KEY_BUTTON; - EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt; - EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling; - EXTI_InitStructure.EXTI_LineCmd = ENABLE; - EXTI_Init(&EXTI_InitStructure); -} - -/******************************************************************************* -* Function Name : RTC_Configuration -* Description : Configures RTC clock source and prescaler. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void RTC_Configuration(void) -{ - /* Check if the StandBy flag is set */ - if(PWR_GetFlagStatus(PWR_FLAG_SB) != RESET) - {/* System resumed from STANDBY mode */ - - /* Turn on led connected to GPIO_LED Pin7 */ - GPIO_SetBits(GPIO_LED, GPIO_Pin_7); - - /* Clear StandBy flag */ - PWR_ClearFlag(PWR_FLAG_SB); - - /* Wait for RTC APB registers synchronisation */ - RTC_WaitForSynchro(); - /* No need to configure the RTC as the RTC configuration(clock source, enable, - prescaler,...) is kept after wake-up from STANDBY */ - } - else - {/* StandBy flag is not set */ - - /* RTC clock source configuration ----------------------------------------*/ - /* Reset Backup Domain */ - BKP_DeInit(); - - /* Enable LSE OSC */ - RCC_LSEConfig(RCC_LSE_ON); - /* Wait till LSE is ready */ - while(RCC_GetFlagStatus(RCC_FLAG_LSERDY) == RESET) - { - } - - /* Select the RTC Clock Source */ - RCC_RTCCLKConfig(RCC_RTCCLKSource_LSE); - - /* Enable the RTC Clock */ - RCC_RTCCLKCmd(ENABLE); - - /* RTC configuration -----------------------------------------------------*/ - /* Wait for RTC APB registers synchronisation */ - RTC_WaitForSynchro(); - - /* Set the RTC time base to 1s */ - RTC_SetPrescaler(32767); - /* Wait until last write operation on RTC registers has finished */ - RTC_WaitForLastTask(); - } -} - -/******************************************************************************* -* Function Name : NVIC_Configuration -* Description : Configures NVIC and Vector Table base location. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void NVIC_Configuration(void) -{ - NVIC_InitTypeDef NVIC_InitStructure; - - /* Set the Vector Table base location at 0x08000000 */ - NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x0); - - NVIC_InitStructure.NVIC_IRQChannel = EXTI9_5_IRQChannel; - NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; - NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; - NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; - NVIC_Init(&NVIC_InitStructure); -} - -/******************************************************************************* -* Function Name : SysTick_Configuration -* Description : Configures the SysTick to generate an interrupt each 250 ms. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void SysTick_Configuration(void) -{ - /* Select AHB clock(HCLK) divided by 8 as SysTick clock source */ - SysTick_CLKSourceConfig(SysTick_CLKSource_HCLK_Div8); - - /* Set SysTick Preemption Priority to 1 */ - NVIC_SystemHandlerPriorityConfig(SystemHandler_SysTick, 1, 0); - - /* SysTick interrupt each 250 ms with HCLK equal to 9MHz */ - SysTick_SetReload(2250000); - - /* Enable the SysTick Interrupt */ - SysTick_ITConfig(ENABLE); - - /* Enable the SysTick Counter */ - SysTick_CounterCmd(SysTick_Counter_Enable); -} - -#ifdef DEBUG -/******************************************************************************* -* Function Name : assert_failed -* Description : Reports the name of the source file and the source line number -* where the assert_param error has occurred. -* Input : - file: pointer to the source file name -* - line: assert_param error line source number -* Output : None -* Return : None -*******************************************************************************/ -void assert_failed(u8* file, u32 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 2008 STMicroelectronics *****END OF FILE****/ diff --git a/src/stm32lib/examples/PWR/STANDBY/platform_config.h b/src/stm32lib/examples/PWR/STANDBY/platform_config.h deleted file mode 100755 index 3deb7ba..0000000 --- a/src/stm32lib/examples/PWR/STANDBY/platform_config.h +++ /dev/null @@ -1,56 +0,0 @@ -/******************** (C) COPYRIGHT 2008 STMicroelectronics ******************** -* File Name : platform_config.h -* Author : MCD Application Team -* Version : V2.0.1 -* Date : 06/13/2008 -* Description : Evaluation board specific configuration file. -******************************************************************************** -* 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. -*******************************************************************************/ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __PLATFORM_CONFIG_H -#define __PLATFORM_CONFIG_H - -/* Includes ------------------------------------------------------------------*/ -/* Exported types ------------------------------------------------------------*/ -/* Exported constants --------------------------------------------------------*/ -/* Uncomment the line corresponding to the STMicroelectronics evaluation board - used to run the example */ -#if !defined (USE_STM3210B_EVAL) && !defined (USE_STM3210E_EVAL) - //#define USE_STM3210B_EVAL - #define USE_STM3210E_EVAL -#endif - -/* Define the STM32F10x hardware depending on the used evaluation board */ -#ifdef USE_STM3210B_EVAL - #define GPIO_LED GPIOC - #define RCC_APB2Periph_GPIO_LED RCC_APB2Periph_GPIOC - #define GPIO_KEY_BUTTON GPIOB - #define RCC_APB2Periph_GPIO_KEY_BUTTON RCC_APB2Periph_GPIOB - #define GPIO_PIN_KEY_BUTTON GPIO_Pin_9 - #define EXTI_LINE_KEY_BUTTON EXTI_Line9 - #define GPIO_PORT_SOURCE_KEY_BUTTON GPIO_PortSourceGPIOB - #define GPIO_PIN_SOURCE_KEY_BUTTON GPIO_PinSource9 -#elif defined USE_STM3210E_EVAL - #define GPIO_LED GPIOF - #define RCC_APB2Periph_GPIO_LED RCC_APB2Periph_GPIOF - #define GPIO_KEY_BUTTON GPIOG - #define RCC_APB2Periph_GPIO_KEY_BUTTON RCC_APB2Periph_GPIOG - #define GPIO_PIN_KEY_BUTTON GPIO_Pin_8 - #define EXTI_LINE_KEY_BUTTON EXTI_Line8 - #define GPIO_PORT_SOURCE_KEY_BUTTON GPIO_PortSourceGPIOG - #define GPIO_PIN_SOURCE_KEY_BUTTON GPIO_PinSource8 -#endif /* USE_STM3210B_EVAL */ - -/* Exported macro ------------------------------------------------------------*/ -/* Exported functions ------------------------------------------------------- */ - -#endif /* __PLATFORM_CONFIG_H */ - -/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/ diff --git a/src/stm32lib/examples/PWR/STANDBY/readme.txt b/src/stm32lib/examples/PWR/STANDBY/readme.txt deleted file mode 100755 index 242129f..0000000 --- a/src/stm32lib/examples/PWR/STANDBY/readme.txt +++ /dev/null @@ -1,97 +0,0 @@ -/******************** (C) COPYRIGHT 2008 STMicroelectronics ******************** -* File Name : readme.txt -* Author : MCD Application Team -* Version : V2.0.1 -* Date : 06/13/2008 -* Description : Description of the PWR STANDBY 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. -*******************************************************************************/ - -Example description -=================== -This example shows how to enters the system to STANDBY mode and wake-up from this -mode using: external RESET, RTC Alarm or WKUP pin. - -In the associated software, the system clock is set to 72 MHz, an EXTI line -is configured to generate an interrupt on falling edge and the SysTick is programmed -to generate an interrupt each 250 ms. In the SysTick interrupt handler, a led -connected to GPIO_LED Pin6(LD1) is toggled, this is used to indicate whether the MCU is -in STANDBY or RUN mode. -When a falling edge is detected on the EXTI line an interrupt is generated. In the -EXTI handler routine the RTC is configured to generate an Alarm event in 3 second -then the system enters STANDBY mode causing the LD1 to stop toggling. -A rising edge on WKUP pin or an external RESET will wake-up the system from -STANDBY. If within 3 second neither rising edge on WKUP pin nor external RESET -are generated, the RTC Alarm will wake-up the system. -After wake-up from STANDBY mode, program execution restarts in the same way as after -a RESET, the LD1 restarts toggling, GPIO_LED Pin6 is set to high level and the RTC -configuration (clock source, enable, prescaler,...) is kept. As result there is no -need to configure the RTC. - -Two leds connected to GPIO_LED Pin6(LD1) and Pin7(LD2) pins are used to monitor -the system state as following: - - LD1 toggling: system in RUN mode - - LD1 off / LD2 off: system in STANDBY mode - - LD2 on: system resumed from STANDBY mode - - -Directory contents -================== -platform_config.h Evaluation board specific configuration file -stm32f10x_conf.h Library Configuration file -stm32f10x_it.c Interrupt handlers -stm32f10x_it.h Header for stm32f10x_it.c -main.c Main program -main.h Header for main.c - - -Hardware environment -==================== -This example runs on STMicroelectronics STM3210B-EVAL and STM3210E-EVAL evaluation -boards and can be easily tailored to any other hardware. -To select the STMicroelectronics evaluation board used to run the example, uncomment -the corresponding line in platform_config.h file. - - + STM3210B-EVAL - - Use LD1 and LD2 leds connected respectively to PC.06 and PC.07 pins - - Use the Key push-button connected to pin PB.09 (EXTI Line9). - - Use the Wakep push-button connected to WKUP(PA.00) pin - - + STM3210E-EVAL - - Use LD1 and LD2 leds connected respectively to PF.06 and PF.07 pins - - Use the Key push-button connected to pin PG.08 (EXTI Line8). - - Use the Wakep push-button connected to WKUP(PA.00) pin - Note: the jumper JP4 must be not fit to be able to use the Wakeup push-button - - - -How to use it -============= -In order to make the program work, you must do the following : -- Create a project and setup all your toolchain's start-up files -- Compile the directory content files and required Library files: - + stm32f10x_nvic.c - + stm32f10x_rcc.c - + stm32f10x_lib.c - + stm32f10x_gpio.c - + stm32f10x_rtc.c - + stm32f10x_pwr.c - + stm32f10x_bkp.c - + stm32f10x_exti.c - + stm32f10x_flash.c - + stm32f10x_systick.c -- Link all compiled files and load your image into target memory -- Run the example in standalone mode (without debugger connection) - -NOTE: For power consumption measurement in STANDBY mode, you have to replace - jumper JP9 in the STM3210B-EVAL board or JP12 in the STM3210E-EVAL board - by an ampermeter. - - -******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****** diff --git a/src/stm32lib/examples/PWR/STANDBY/stm32f10x_conf.h b/src/stm32lib/examples/PWR/STANDBY/stm32f10x_conf.h deleted file mode 100755 index 0838006..0000000 --- a/src/stm32lib/examples/PWR/STANDBY/stm32f10x_conf.h +++ /dev/null @@ -1,170 +0,0 @@ -/******************** (C) COPYRIGHT 2008 STMicroelectronics ******************** -* File Name : stm32f10x_conf.h -* Author : MCD Application Team -* Version : V2.0.1 -* Date : 06/13/2008 -* Description : Library configuration file. -******************************************************************************** -* 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. -*******************************************************************************/ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32F10x_CONF_H -#define __STM32F10x_CONF_H - -/* Includes ------------------------------------------------------------------*/ -#include "stm32f10x_type.h" - -/* Exported types ------------------------------------------------------------*/ -/* Exported constants --------------------------------------------------------*/ -/* Uncomment the line below to compile the library in DEBUG mode, this will expanse - the "assert_param" macro in the firmware library code (see "Exported macro" - section below) */ -/*#define DEBUG 1*/ - -/* Comment the line below to disable the specific peripheral inclusion */ -/************************************* ADC ************************************/ -//#define _ADC -//#define _ADC1 -//#define _ADC2 -//#define _ADC3 - -/************************************* BKP ************************************/ -#define _BKP - -/************************************* CAN ************************************/ -//#define _CAN - -/************************************* CRC ************************************/ -//#define _CRC - -/************************************* DAC ************************************/ -//#define _DAC - -/************************************* DBGMCU *********************************/ -//#define _DBGMCU - -/************************************* DMA ************************************/ -//#define _DMA -//#define _DMA1_Channel1 -//#define _DMA1_Channel2 -//#define _DMA1_Channel3 -//#define _DMA1_Channel4 -//#define _DMA1_Channel5 -//#define _DMA1_Channel6 -//#define _DMA1_Channel7 -//#define _DMA2_Channel1 -//#define _DMA2_Channel2 -//#define _DMA2_Channel3 -//#define _DMA2_Channel4 -//#define _DMA2_Channel5 - -/************************************* EXTI ***********************************/ -#define _EXTI - -/************************************* FLASH and Option Bytes *****************/ -#define _FLASH -/* Uncomment the line below to enable FLASH program/erase/protections functions, - otherwise only FLASH configuration (latency, prefetch, half cycle) functions - are enabled */ -/* #define _FLASH_PROG */ - -/************************************* FSMC ***********************************/ -//#define _FSMC - -/************************************* GPIO ***********************************/ -#define _GPIO -#define _GPIOA -#define _GPIOB -#define _GPIOC -#define _GPIOD -#define _GPIOE -#define _GPIOF -#define _GPIOG -#define _AFIO - -/************************************* I2C ************************************/ -//#define _I2C -//#define _I2C1 -//#define _I2C2 - -/************************************* IWDG ***********************************/ -//#define _IWDG - -/************************************* NVIC ***********************************/ -#define _NVIC - -/************************************* PWR ************************************/ -#define _PWR - -/************************************* RCC ************************************/ -#define _RCC - -/************************************* RTC ************************************/ -#define _RTC - -/************************************* SDIO ***********************************/ -//#define _SDIO - -/************************************* SPI ************************************/ -//#define _SPI -//#define _SPI1 -//#define _SPI2 -//#define _SPI3 - -/************************************* SysTick ********************************/ -#define _SysTick - -/************************************* TIM ************************************/ -//#define _TIM -//#define _TIM1 -//#define _TIM2 -//#define _TIM3 -//#define _TIM4 -//#define _TIM5 -//#define _TIM6 -//#define _TIM7 -//#define _TIM8 - -/************************************* USART **********************************/ -//#define _USART -//#define _USART1 -//#define _USART2 -//#define _USART3 -//#define _UART4 -//#define _UART5 - -/************************************* WWDG ***********************************/ -//#define _WWDG - -/* In the following line adjust the value of External High Speed oscillator (HSE) - used in your application */ -#define HSE_Value ((u32)8000000) /* Value of the External oscillator in Hz*/ - -/* Exported macro ------------------------------------------------------------*/ -#ifdef DEBUG -/******************************************************************************* -* Macro Name : assert_param -* Description : The assert_param macro is used for function's parameters check. -* It is used only if the library is compiled in DEBUG mode. -* Input : - 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. -* Return : None -*******************************************************************************/ - #define assert_param(expr) ((expr) ? (void)0 : assert_failed((u8 *)__FILE__, __LINE__)) -/* Exported functions ------------------------------------------------------- */ - void assert_failed(u8* file, u32 line); -#else - #define assert_param(expr) ((void)0) -#endif /* DEBUG */ - -#endif /* __STM32F10x_CONF_H */ - -/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/ diff --git a/src/stm32lib/examples/PWR/STANDBY/stm32f10x_it.c b/src/stm32lib/examples/PWR/STANDBY/stm32f10x_it.c deleted file mode 100755 index ba46a35..0000000 --- a/src/stm32lib/examples/PWR/STANDBY/stm32f10x_it.c +++ /dev/null @@ -1,833 +0,0 @@ -/******************** (C) COPYRIGHT 2008 STMicroelectronics ******************** -* File Name : stm32f10x_it.c -* Author : MCD Application Team -* Version : V2.0.1 -* Date : 06/13/2008 -* Description : Main Interrupt Service Routines. -* This file provides template for all exceptions handler -* and peripherals interrupt service routine. -******************************************************************************** -* 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. -*******************************************************************************/ - -/* Includes ------------------------------------------------------------------*/ -#include "stm32f10x_it.h" -#include "platform_config.h" - -/* Private typedef -----------------------------------------------------------*/ -/* Private define ------------------------------------------------------------*/ -/* Private macro -------------------------------------------------------------*/ -/* Private variables ---------------------------------------------------------*/ -/* Private function prototypes -----------------------------------------------*/ -/* Private functions ---------------------------------------------------------*/ - -/******************************************************************************* -* Function Name : NMIException -* Description : This function handles NMI exception. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void NMIException(void) -{ -} - -/******************************************************************************* -* Function Name : HardFaultException -* Description : This function handles Hard Fault exception. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void HardFaultException(void) -{ - /* Go to infinite loop when Hard Fault exception occurs */ - while (1) - { - } -} - -/******************************************************************************* -* Function Name : MemManageException -* Description : This function handles Memory Manage exception. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void MemManageException(void) -{ - /* Go to infinite loop when Memory Manage exception occurs */ - while (1) - { - } -} - -/******************************************************************************* -* Function Name : BusFaultException -* Description : This function handles Bus Fault exception. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void BusFaultException(void) -{ - /* Go to infinite loop when Bus Fault exception occurs */ - while (1) - { - } -} - -/******************************************************************************* -* Function Name : UsageFaultException -* Description : This function handles Usage Fault exception. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void UsageFaultException(void) -{ - /* Go to infinite loop when Usage Fault exception occurs */ - while (1) - { - } -} - -/******************************************************************************* -* Function Name : DebugMonitor -* Description : This function handles Debug Monitor exception. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DebugMonitor(void) -{ -} - -/******************************************************************************* -* Function Name : SVCHandler -* Description : This function handles SVCall exception. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void SVCHandler(void) -{ -} - -/******************************************************************************* -* Function Name : PendSVC -* Description : This function handles PendSVC exception. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void PendSVC(void) -{ -} - -/******************************************************************************* -* Function Name : SysTickHandler -* Description : This function handles SysTick Handler. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void SysTickHandler(void) -{ - /* Toggle Led connected to GPIO_LED Pin6 */ - GPIO_WriteBit(GPIO_LED, GPIO_Pin_6, (BitAction)(1-GPIO_ReadOutputDataBit(GPIO_LED, GPIO_Pin_6))); -} - -/******************************************************************************* -* Function Name : WWDG_IRQHandler -* Description : This function handles WWDG interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void WWDG_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : PVD_IRQHandler -* Description : This function handles PVD interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void PVD_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TAMPER_IRQHandler -* Description : This function handles Tamper interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TAMPER_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : RTC_IRQHandler -* Description : This function handles RTC global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void RTC_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : FLASH_IRQHandler -* Description : This function handles Flash interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void FLASH_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : RCC_IRQHandler -* Description : This function handles RCC interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void RCC_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : EXTI0_IRQHandler -* Description : This function handles External interrupt Line 0 request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void EXTI0_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : EXTI1_IRQHandler -* Description : This function handles External interrupt Line 1 request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void EXTI1_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : EXTI2_IRQHandler -* Description : This function handles External interrupt Line 2 request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void EXTI2_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : EXTI3_IRQHandler -* Description : This function handles External interrupt Line 3 request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void EXTI3_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : EXTI4_IRQHandler -* Description : This function handles External interrupt Line 4 request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void EXTI4_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA1_Channel1_IRQHandler -* Description : This function handles DMA1 Channel 1 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA1_Channel1_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA1_Channel2_IRQHandler -* Description : This function handles DMA1 Channel 2 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA1_Channel2_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA1_Channel3_IRQHandler -* Description : This function handles DMA1 Channel 3 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA1_Channel3_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA1_Channel4_IRQHandler -* Description : This function handles DMA1 Channel 4 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA1_Channel4_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA1_Channel5_IRQHandler -* Description : This function handles DMA1 Channel 5 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA1_Channel5_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA1_Channel6_IRQHandler -* Description : This function handles DMA1 Channel 6 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA1_Channel6_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA1_Channel7_IRQHandler -* Description : This function handles DMA1 Channel 7 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA1_Channel7_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : ADC1_2_IRQHandler -* Description : This function handles ADC1 and ADC2 global interrupts requests. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void ADC1_2_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : USB_HP_CAN_TX_IRQHandler -* Description : This function handles USB High Priority or CAN TX interrupts -* requests. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void USB_HP_CAN_TX_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : USB_LP_CAN_RX0_IRQHandler -* Description : This function handles USB Low Priority or CAN RX0 interrupts -* requests. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void USB_LP_CAN_RX0_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : CAN_RX1_IRQHandler -* Description : This function handles CAN RX1 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void CAN_RX1_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : CAN_SCE_IRQHandler -* Description : This function handles CAN SCE interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void CAN_SCE_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : EXTI9_5_IRQHandler -* Description : This function handles External lines 9 to 5 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void EXTI9_5_IRQHandler(void) -{ - if(EXTI_GetITStatus(EXTI_LINE_KEY_BUTTON) != RESET) - { - /* Clear the Key Button EXTI line pending bit */ - EXTI_ClearITPendingBit(EXTI_LINE_KEY_BUTTON); - - /* Turn on led connected to GPIO_LED pin6 */ - GPIO_SetBits(GPIO_LED, GPIO_Pin_6); - - /* Wait till RTC Second event occurs */ - RTC_ClearFlag(RTC_FLAG_SEC); - while(RTC_GetFlagStatus(RTC_FLAG_SEC) == RESET); - - /* Set the RTC Alarm after 3s */ - RTC_SetAlarm(RTC_GetCounter()+ 3); - /* Wait until last write operation on RTC registers has finished */ - RTC_WaitForLastTask(); - - /* Request to enter STANDBY mode (Wake Up flag is cleared in PWR_EnterSTANDBYMode function) */ - PWR_EnterSTANDBYMode(); - } -} - -/******************************************************************************* -* Function Name : TIM1_BRK_IRQHandler -* Description : This function handles TIM1 Break interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM1_BRK_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM1_UP_IRQHandler -* Description : This function handles TIM1 overflow and update interrupt -* request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM1_UP_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM1_TRG_COM_IRQHandler -* Description : This function handles TIM1 Trigger and commutation interrupts -* requests. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM1_TRG_COM_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM1_CC_IRQHandler -* Description : This function handles TIM1 capture compare interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM1_CC_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM2_IRQHandler -* Description : This function handles TIM2 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM2_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM3_IRQHandler -* Description : This function handles TIM3 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM3_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM4_IRQHandler -* Description : This function handles TIM4 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM4_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : I2C1_EV_IRQHandler -* Description : This function handles I2C1 Event interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void I2C1_EV_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : I2C1_ER_IRQHandler -* Description : This function handles I2C1 Error interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void I2C1_ER_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : I2C2_EV_IRQHandler -* Description : This function handles I2C2 Event interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void I2C2_EV_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : I2C2_ER_IRQHandler -* Description : This function handles I2C2 Error interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void I2C2_ER_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : SPI1_IRQHandler -* Description : This function handles SPI1 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void SPI1_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : SPI2_IRQHandler -* Description : This function handles SPI2 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void SPI2_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : USART1_IRQHandler -* Description : This function handles USART1 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void USART1_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : USART2_IRQHandler -* Description : This function handles USART2 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void USART2_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : USART3_IRQHandler -* Description : This function handles USART3 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void USART3_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : EXTI15_10_IRQHandler -* Description : This function handles External lines 15 to 10 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void EXTI15_10_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : RTCAlarm_IRQHandler -* Description : This function handles RTC Alarm interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void RTCAlarm_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : USBWakeUp_IRQHandler -* Description : This function handles USB WakeUp interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void USBWakeUp_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM8_BRK_IRQHandler -* Description : This function handles TIM8 Break interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM8_BRK_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM8_UP_IRQHandler -* Description : This function handles TIM8 overflow and update interrupt -* request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM8_UP_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM8_TRG_COM_IRQHandler -* Description : This function handles TIM8 Trigger and commutation interrupts -* requests. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM8_TRG_COM_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM8_CC_IRQHandler -* Description : This function handles TIM8 capture compare interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM8_CC_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : ADC3_IRQHandler -* Description : This function handles ADC3 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void ADC3_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : FSMC_IRQHandler -* Description : This function handles FSMC global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void FSMC_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : SDIO_IRQHandler -* Description : This function handles SDIO global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void SDIO_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM5_IRQHandler -* Description : This function handles TIM5 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM5_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : SPI3_IRQHandler -* Description : This function handles SPI3 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void SPI3_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : UART4_IRQHandler -* Description : This function handles UART4 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void UART4_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : UART5_IRQHandler -* Description : This function handles UART5 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void UART5_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM6_IRQHandler -* Description : This function handles TIM6 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM6_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM7_IRQHandler -* Description : This function handles TIM7 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM7_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA2_Channel1_IRQHandler -* Description : This function handles DMA2 Channel 1 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA2_Channel1_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA2_Channel2_IRQHandler -* Description : This function handles DMA2 Channel 2 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA2_Channel2_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA2_Channel3_IRQHandler -* Description : This function handles DMA2 Channel 3 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA2_Channel3_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA2_Channel4_5_IRQHandler -* Description : This function handles DMA2 Channel 4 and DMA2 Channel 5 -* interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA2_Channel4_5_IRQHandler(void) -{ -} - -/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/ diff --git a/src/stm32lib/examples/PWR/STANDBY/stm32f10x_it.h b/src/stm32lib/examples/PWR/STANDBY/stm32f10x_it.h deleted file mode 100755 index e74b6cc..0000000 --- a/src/stm32lib/examples/PWR/STANDBY/stm32f10x_it.h +++ /dev/null @@ -1,100 +0,0 @@ -/******************** (C) COPYRIGHT 2008 STMicroelectronics ******************** -* File Name : stm32f10x_it.h -* Author : MCD Application Team -* Version : V2.0.1 -* Date : 06/13/2008 -* Description : This file contains the headers of the interrupt handlers. -******************************************************************************** -* 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. -*******************************************************************************/ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32F10x_IT_H -#define __STM32F10x_IT_H - -/* Includes ------------------------------------------------------------------*/ -#include "stm32f10x_lib.h" - -/* Exported types ------------------------------------------------------------*/ -/* Exported constants --------------------------------------------------------*/ -/* Exported macro ------------------------------------------------------------*/ -/* Exported functions ------------------------------------------------------- */ - -void NMIException(void); -void HardFaultException(void); -void MemManageException(void); -void BusFaultException(void); -void UsageFaultException(void); -void DebugMonitor(void); -void SVCHandler(void); -void PendSVC(void); -void SysTickHandler(void); -void WWDG_IRQHandler(void); -void PVD_IRQHandler(void); -void TAMPER_IRQHandler(void); -void RTC_IRQHandler(void); -void FLASH_IRQHandler(void); -void RCC_IRQHandler(void); -void EXTI0_IRQHandler(void); -void EXTI1_IRQHandler(void); -void EXTI2_IRQHandler(void); -void EXTI3_IRQHandler(void); -void EXTI4_IRQHandler(void); -void DMA1_Channel1_IRQHandler(void); -void DMA1_Channel2_IRQHandler(void); -void DMA1_Channel3_IRQHandler(void); -void DMA1_Channel4_IRQHandler(void); -void DMA1_Channel5_IRQHandler(void); -void DMA1_Channel6_IRQHandler(void); -void DMA1_Channel7_IRQHandler(void); -void ADC1_2_IRQHandler(void); -void USB_HP_CAN_TX_IRQHandler(void); -void USB_LP_CAN_RX0_IRQHandler(void); -void CAN_RX1_IRQHandler(void); -void CAN_SCE_IRQHandler(void); -void EXTI9_5_IRQHandler(void); -void TIM1_BRK_IRQHandler(void); -void TIM1_UP_IRQHandler(void); -void TIM1_TRG_COM_IRQHandler(void); -void TIM1_CC_IRQHandler(void); -void TIM2_IRQHandler(void); -void TIM3_IRQHandler(void); -void TIM4_IRQHandler(void); -void I2C1_EV_IRQHandler(void); -void I2C1_ER_IRQHandler(void); -void I2C2_EV_IRQHandler(void); -void I2C2_ER_IRQHandler(void); -void SPI1_IRQHandler(void); -void SPI2_IRQHandler(void); -void USART1_IRQHandler(void); -void USART2_IRQHandler(void); -void USART3_IRQHandler(void); -void EXTI15_10_IRQHandler(void); -void RTCAlarm_IRQHandler(void); -void USBWakeUp_IRQHandler(void); -void TIM8_BRK_IRQHandler(void); -void TIM8_UP_IRQHandler(void); -void TIM8_TRG_COM_IRQHandler(void); -void TIM8_CC_IRQHandler(void); -void ADC3_IRQHandler(void); -void FSMC_IRQHandler(void); -void SDIO_IRQHandler(void); -void TIM5_IRQHandler(void); -void SPI3_IRQHandler(void); -void UART4_IRQHandler(void); -void UART5_IRQHandler(void); -void TIM6_IRQHandler(void); -void TIM7_IRQHandler(void); -void DMA2_Channel1_IRQHandler(void); -void DMA2_Channel2_IRQHandler(void); -void DMA2_Channel3_IRQHandler(void); -void DMA2_Channel4_5_IRQHandler(void); - -#endif /* __STM32F10x_IT_H */ - -/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/ diff --git a/src/stm32lib/examples/PWR/STOP/main.c b/src/stm32lib/examples/PWR/STOP/main.c deleted file mode 100755 index 48e715e..0000000 --- a/src/stm32lib/examples/PWR/STOP/main.c +++ /dev/null @@ -1,391 +0,0 @@ -/******************** (C) COPYRIGHT 2008 STMicroelectronics ******************** -* File Name : main.c -* Author : MCD Application Team -* Version : V2.0.1 -* Date : 06/13/2008 -* Description : Main program body. -******************************************************************************** -* 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. -*******************************************************************************/ - -/* Includes ------------------------------------------------------------------*/ -#include "stm32f10x_lib.h" -#include "platform_config.h" - -/* Private typedef -----------------------------------------------------------*/ -/* Private define ------------------------------------------------------------*/ -/* Private macro -------------------------------------------------------------*/ -/* Private variables ---------------------------------------------------------*/ -extern vu32 TimingDelay; -ErrorStatus HSEStartUpStatus; - -/* Private function prototypes -----------------------------------------------*/ -void SYSCLKConfig_STOP(void); -void RCC_Configuration(void); -void GPIO_Configuration(void); -void EXTI_Configuration(void); -void RTC_Configuration(void); -void NVIC_Configuration(void); -void SysTick_Configuration(void); -void Delay(vu32 nTime); - -/* Private functions ---------------------------------------------------------*/ -/******************************************************************************* -* Function Name : main -* Description : Main program. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -int main(void) -{ -#ifdef DEBUG - debug(); -#endif - - /* Clock configuration */ - RCC_Configuration(); - - /* Enable PWR and BKP clock */ - RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR | RCC_APB1Periph_BKP, ENABLE); - - /* GPIO configuration */ - GPIO_Configuration(); - - /* Configure EXTI Line to generate an interrupt on falling edge */ - EXTI_Configuration(); - - /* Configure RTC clock source and prescaler */ - RTC_Configuration(); - - /* NVIC configuration */ - NVIC_Configuration(); - - /* Configure the SysTick to generate an interrupt each 1 millisecond */ - SysTick_Configuration(); - - /* Turn on led connected to GPIO_LED Pin6 */ - GPIO_SetBits(GPIO_LED, GPIO_Pin_6); - - while (1) - { - /* Insert 1.5 second delay */ - Delay(1500); - - /* Wait till RTC Second event occurs */ - RTC_ClearFlag(RTC_FLAG_SEC); - while(RTC_GetFlagStatus(RTC_FLAG_SEC) == RESET); - - /* Alarm in 3 second */ - RTC_SetAlarm(RTC_GetCounter()+ 3); - /* Wait until last write operation on RTC registers has finished */ - RTC_WaitForLastTask(); - - /* Turn off led connected to GPIO_LED Pin6 */ - GPIO_ResetBits(GPIO_LED, GPIO_Pin_6); - - /* Request to enter STOP mode with regulator in low power mode*/ - PWR_EnterSTOPMode(PWR_Regulator_LowPower, PWR_STOPEntry_WFI); - - /* At this stage the system has resumed from STOP mode -------------------*/ - /* Turn on led connected to GPIO_LED Pin6 */ - GPIO_SetBits(GPIO_LED, GPIO_Pin_6); - - /* Configures system clock after wake-up from STOP: enable HSE, PLL and select - PLL as system clock source (HSE and PLL are disabled in STOP mode) */ - SYSCLKConfig_STOP(); - } -} - -/******************************************************************************* -* Function Name : RCC_Configuration -* Description : Configures the different system clocks. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void RCC_Configuration(void) -{ - /* SYSCLK, HCLK, PCLK2 and PCLK1 configuration -----------------------------*/ - /* RCC system reset(for debug purpose) */ - RCC_DeInit(); - - /* Enable HSE */ - RCC_HSEConfig(RCC_HSE_ON); - - /* Wait till HSE is ready */ - HSEStartUpStatus = RCC_WaitForHSEStartUp(); - - if(HSEStartUpStatus == SUCCESS) - { - /* Enable Prefetch Buffer */ - FLASH_PrefetchBufferCmd(FLASH_PrefetchBuffer_Enable); - - /* Flash 2 wait state */ - FLASH_SetLatency(FLASH_Latency_2); - - /* HCLK = SYSCLK */ - RCC_HCLKConfig(RCC_SYSCLK_Div1); - - /* PCLK2 = HCLK */ - RCC_PCLK2Config(RCC_HCLK_Div1); - - /* PCLK1 = HCLK/2 */ - RCC_PCLK1Config(RCC_HCLK_Div2); - - /* PLLCLK = 8MHz * 9 = 72 MHz */ - RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_9); - - /* Enable PLL */ - RCC_PLLCmd(ENABLE); - - /* Wait till PLL is ready */ - while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET) - { - } - - /* Select PLL as system clock source */ - RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK); - - /* Wait till PLL is used as system clock source */ - while(RCC_GetSYSCLKSource() != 0x08) - { - } - } -} - -/******************************************************************************* -* Function Name : SYSCLKConfig_STOP -* Description : Configures system clock after wake-up from STOP: enable HSE, PLL -* and select PLL as system clock source. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void SYSCLKConfig_STOP(void) -{ - /* Enable HSE */ - RCC_HSEConfig(RCC_HSE_ON); - - /* Wait till HSE is ready */ - HSEStartUpStatus = RCC_WaitForHSEStartUp(); - - if(HSEStartUpStatus == SUCCESS) - { - /* Enable PLL */ - RCC_PLLCmd(ENABLE); - - /* Wait till PLL is ready */ - while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET) - { - } - - /* Select PLL as system clock source */ - RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK); - - /* Wait till PLL is used as system clock source */ - while(RCC_GetSYSCLKSource() != 0x08) - { - } - } -} - -/******************************************************************************* -* Function Name : GPIO_Configuration -* Description : Configures the different GPIO ports. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void GPIO_Configuration(void) -{ - GPIO_InitTypeDef GPIO_InitStructure; - - /* Enable Key Button GPIO Port, GPIO_LED and AFIO clock */ - RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIO_KEY_BUTTON | RCC_APB2Periph_GPIO_LED - | RCC_APB2Periph_AFIO, ENABLE); - - /* Configure GPIO_LED Pin 6, Pin 7 and Pin 8 as Output push-pull */ - GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6 | GPIO_Pin_7 | GPIO_Pin_8; - GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; - GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; - GPIO_Init(GPIO_LED, &GPIO_InitStructure); - - /* Configure Key Button GPIO Pin as input floating */ - GPIO_InitStructure.GPIO_Pin = GPIO_PIN_KEY_BUTTON; - GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING; - GPIO_Init(GPIO_KEY_BUTTON, &GPIO_InitStructure); -} - -/******************************************************************************* -* Function Name : EXTI_Configuration -* Description : Configures EXTI Lines. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void EXTI_Configuration(void) -{ - EXTI_InitTypeDef EXTI_InitStructure; - - /* Connect Key Button EXTI Line to Key Button GPIO Pin */ - GPIO_EXTILineConfig(GPIO_PORT_SOURCE_KEY_BUTTON, GPIO_PIN_SOURCE_KEY_BUTTON); - - /* Configure Key Button EXTI Line to generate an interrupt on falling edge */ - EXTI_InitStructure.EXTI_Line = EXTI_LINE_KEY_BUTTON; - EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt; - EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling; - EXTI_InitStructure.EXTI_LineCmd = ENABLE; - EXTI_Init(&EXTI_InitStructure); - - /* Configure EXTI Line17(RTC Alarm) to generate an interrupt on rising edge */ - EXTI_ClearITPendingBit(EXTI_Line17); - EXTI_InitStructure.EXTI_Line = EXTI_Line17; - EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising; - EXTI_Init(&EXTI_InitStructure); -} - -/******************************************************************************* -* Function Name : RTC_Configuration -* Description : Configures RTC clock source and prescaler. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void RTC_Configuration(void) -{ - /* RTC clock source configuration ------------------------------------------*/ - /* Allow access to BKP Domain */ - PWR_BackupAccessCmd(ENABLE); - - /* Reset Backup Domain */ - BKP_DeInit(); - - /* Enable the LSE OSC */ - RCC_LSEConfig(RCC_LSE_ON); - /* Wait till LSE is ready */ - while(RCC_GetFlagStatus(RCC_FLAG_LSERDY) == RESET) - { - } - - /* Select the RTC Clock Source */ - RCC_RTCCLKConfig(RCC_RTCCLKSource_LSE); - - /* Enable the RTC Clock */ - RCC_RTCCLKCmd(ENABLE); - - /* RTC configuration -------------------------------------------------------*/ - /* Wait for RTC APB registers synchronisation */ - RTC_WaitForSynchro(); - - /* Set the RTC time base to 1s */ - RTC_SetPrescaler(32767); - /* Wait until last write operation on RTC registers has finished */ - RTC_WaitForLastTask(); - - /* Enable the RTC Alarm interrupt */ - RTC_ITConfig(RTC_IT_ALR, ENABLE); - /* Wait until last write operation on RTC registers has finished */ - RTC_WaitForLastTask(); -} - -/******************************************************************************* -* Function Name : NVIC_Configuration -* Description : Configures NVIC and Vector Table base location. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void NVIC_Configuration(void) -{ - NVIC_InitTypeDef NVIC_InitStructure; - - /* Set the Vector Table base location at 0x08000000 */ - NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x0); - - /* 2 bits for Preemption Priority and 2 bits for Sub Priority */ - NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2); - - NVIC_InitStructure.NVIC_IRQChannel = RTCAlarm_IRQChannel; - NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; - NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; - NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; - NVIC_Init(&NVIC_InitStructure); - - NVIC_InitStructure.NVIC_IRQChannel = EXTI9_5_IRQChannel; - NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1; - NVIC_Init(&NVIC_InitStructure); -} - -/******************************************************************************* -* Function Name : SysTick_Configuration -* Description : Configures the SysTick to generate an interrupt each 1 millisecond. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void SysTick_Configuration(void) -{ - /* Select AHB clock(HCLK) as SysTick clock source */ - SysTick_CLKSourceConfig(SysTick_CLKSource_HCLK); - - /* Set SysTick Priority to 3 */ - NVIC_SystemHandlerPriorityConfig(SystemHandler_SysTick, 3, 0); - - /* SysTick interrupt each 1ms with HCLK equal to 72MHz */ - SysTick_SetReload(72000); - - /* Enable the SysTick Interrupt */ - SysTick_ITConfig(ENABLE); -} - -/******************************************************************************* -* Function Name : Delay -* Description : Inserts a delay time. -* Input : nTime: specifies the delay time length, in milliseconds. -* Output : None -* Return : None -*******************************************************************************/ -void Delay(u32 nTime) -{ - /* Enable the SysTick Counter */ - SysTick_CounterCmd(SysTick_Counter_Enable); - - TimingDelay = nTime; - - while(TimingDelay != 0); - - /* Disable the SysTick Counter */ - SysTick_CounterCmd(SysTick_Counter_Disable); - /* Clear the SysTick Counter */ - SysTick_CounterCmd(SysTick_Counter_Clear); -} - -#ifdef DEBUG -/******************************************************************************* -* Function Name : assert_failed -* Description : Reports the name of the source file and the source line number -* where the assert_param error has occurred. -* Input : - file: pointer to the source file name -* - line: assert_param error line source number -* Output : None -* Return : None -*******************************************************************************/ -void assert_failed(u8* file, u32 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 2008 STMicroelectronics *****END OF FILE****/ diff --git a/src/stm32lib/examples/PWR/STOP/platform_config.h b/src/stm32lib/examples/PWR/STOP/platform_config.h deleted file mode 100755 index 3deb7ba..0000000 --- a/src/stm32lib/examples/PWR/STOP/platform_config.h +++ /dev/null @@ -1,56 +0,0 @@ -/******************** (C) COPYRIGHT 2008 STMicroelectronics ******************** -* File Name : platform_config.h -* Author : MCD Application Team -* Version : V2.0.1 -* Date : 06/13/2008 -* Description : Evaluation board specific configuration file. -******************************************************************************** -* 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. -*******************************************************************************/ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __PLATFORM_CONFIG_H -#define __PLATFORM_CONFIG_H - -/* Includes ------------------------------------------------------------------*/ -/* Exported types ------------------------------------------------------------*/ -/* Exported constants --------------------------------------------------------*/ -/* Uncomment the line corresponding to the STMicroelectronics evaluation board - used to run the example */ -#if !defined (USE_STM3210B_EVAL) && !defined (USE_STM3210E_EVAL) - //#define USE_STM3210B_EVAL - #define USE_STM3210E_EVAL -#endif - -/* Define the STM32F10x hardware depending on the used evaluation board */ -#ifdef USE_STM3210B_EVAL - #define GPIO_LED GPIOC - #define RCC_APB2Periph_GPIO_LED RCC_APB2Periph_GPIOC - #define GPIO_KEY_BUTTON GPIOB - #define RCC_APB2Periph_GPIO_KEY_BUTTON RCC_APB2Periph_GPIOB - #define GPIO_PIN_KEY_BUTTON GPIO_Pin_9 - #define EXTI_LINE_KEY_BUTTON EXTI_Line9 - #define GPIO_PORT_SOURCE_KEY_BUTTON GPIO_PortSourceGPIOB - #define GPIO_PIN_SOURCE_KEY_BUTTON GPIO_PinSource9 -#elif defined USE_STM3210E_EVAL - #define GPIO_LED GPIOF - #define RCC_APB2Periph_GPIO_LED RCC_APB2Periph_GPIOF - #define GPIO_KEY_BUTTON GPIOG - #define RCC_APB2Periph_GPIO_KEY_BUTTON RCC_APB2Periph_GPIOG - #define GPIO_PIN_KEY_BUTTON GPIO_Pin_8 - #define EXTI_LINE_KEY_BUTTON EXTI_Line8 - #define GPIO_PORT_SOURCE_KEY_BUTTON GPIO_PortSourceGPIOG - #define GPIO_PIN_SOURCE_KEY_BUTTON GPIO_PinSource8 -#endif /* USE_STM3210B_EVAL */ - -/* Exported macro ------------------------------------------------------------*/ -/* Exported functions ------------------------------------------------------- */ - -#endif /* __PLATFORM_CONFIG_H */ - -/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/ diff --git a/src/stm32lib/examples/PWR/STOP/readme.txt b/src/stm32lib/examples/PWR/STOP/readme.txt deleted file mode 100755 index fa6bbb3..0000000 --- a/src/stm32lib/examples/PWR/STOP/readme.txt +++ /dev/null @@ -1,95 +0,0 @@ -/******************** (C) COPYRIGHT 2008 STMicroelectronics ******************** -* File Name : readme.txt -* Author : MCD Application Team -* Version : V2.0.1 -* Date : 06/13/2008 -* Description : Description of the PWR STOP 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. -*******************************************************************************/ - -Example description -=================== -This example shows how to enter the system to STOP mode and wake-up using EXTI -Line interrupts. The EXTI Line sources are PB.09/PG.08 and RTC Alarm. - -The EXTI line9/8 is configured to generate interrupt on falling edge. -The EXTI line17(RTC Alarm) is configured to generate interrupt on rising edge and -the RTC time base is set to 1 second using the external low speed oscillator(LSE). - -The system clock is set to 72 MHz using the external high speed oscillator(HSE). - -The system enters and exits STOP mode as following: -After 2 second from system start-up, the RTC is configured to generate an Alarm -event in 3 second then the system enters STOP mode. To wake-up from STOP mode you -have to apply a rising edge on EXTI line9/8, otherwise the RTC Alarm will wake-up -the system within 3 second. After exit from STOP the system clock is reconfigured -to its previous state (as HSE and PLL are disabled in STOP mode). -Then after a delay the system will enter again in STOP mode and exit in the way -described above. This behavior is repeated in an infinite loop. - -Four leds connected to GPIO_LED Pin6(LD1), Pin7(LD2) and Pin8(LD3) are used to -monitor the system state as following: - - LD1 on: system in RUN mode - - LD1 off: system in STOP mode - - LD2 is toggled if EXTI Line9/8 is used to exit from STOP - - LD3 is toggled if EXTI line17(RTC Alarm) is used to exit from STOP - - -Directory contents -================== -platform_config.h Evaluation board specific configuration file -stm32f10x_conf.h Library Configuration file -stm32f10x_it.c Interrupt handlers -stm32f10x_it.h Header for stm32f10x_it.c -main.c Main program -main.h Header for main.c - - -Hardware environment -==================== -This example runs on STMicroelectronics STM3210B-EVAL and STM3210E-EVAL evaluation -boards and can be easily tailored to any other hardware. -To select the STMicroelectronics evaluation board used to run the example, uncomment -the corresponding line in platform_config.h file. - - + STM3210B-EVAL - - Use LD1, LD2 and LD3 leds connected respectively to PC.06, PC.07 and PC.08 pins - - Use the Key push-button connected to pin PB.09 (EXTI Line9). - - + STM3210E-EVAL - - Use LD1, LD2 and LD3 leds connected respectively to PF.06, PF0.7 and PF.08 pins - - Use the Key push-button connected to pin PG.08 (EXTI Line8). - - -How to use it -============= -In order to make the program work, you must do the following : -- Create a project and setup all your toolchain's start-up files -- Compile the directory content files and required Library files : - + stm32f10x_nvic.c - + stm32f10x_rcc.c - + stm32f10x_lib.c - + stm32f10x_gpio.c - + stm32f10x_rtc.c - + stm32f10x_pwr.c - + stm32f10x_bkp.c - + stm32f10x_exti.c - + stm32f10x_flash.c - + stm32f10x_systick.c - -- Link all compiled files and load your image into target memory -- Run the example in standalone mode (without debugger connection) - -NOTE: For power consumption measurement in STOP mode you have to: -1. Modify the example to configure all unused GPIO port pins in Analog Input mode - (floating input trigger OFF). Refer to GPIO\IOToggle example for more details. -2. Replace jumper JP9 in the STM3210B-EVAL board or JP12 in the STM3210E-EVAL - board by an ampermeter. - -******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****** diff --git a/src/stm32lib/examples/PWR/STOP/stm32f10x_conf.h b/src/stm32lib/examples/PWR/STOP/stm32f10x_conf.h deleted file mode 100755 index 0838006..0000000 --- a/src/stm32lib/examples/PWR/STOP/stm32f10x_conf.h +++ /dev/null @@ -1,170 +0,0 @@ -/******************** (C) COPYRIGHT 2008 STMicroelectronics ******************** -* File Name : stm32f10x_conf.h -* Author : MCD Application Team -* Version : V2.0.1 -* Date : 06/13/2008 -* Description : Library configuration file. -******************************************************************************** -* 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. -*******************************************************************************/ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32F10x_CONF_H -#define __STM32F10x_CONF_H - -/* Includes ------------------------------------------------------------------*/ -#include "stm32f10x_type.h" - -/* Exported types ------------------------------------------------------------*/ -/* Exported constants --------------------------------------------------------*/ -/* Uncomment the line below to compile the library in DEBUG mode, this will expanse - the "assert_param" macro in the firmware library code (see "Exported macro" - section below) */ -/*#define DEBUG 1*/ - -/* Comment the line below to disable the specific peripheral inclusion */ -/************************************* ADC ************************************/ -//#define _ADC -//#define _ADC1 -//#define _ADC2 -//#define _ADC3 - -/************************************* BKP ************************************/ -#define _BKP - -/************************************* CAN ************************************/ -//#define _CAN - -/************************************* CRC ************************************/ -//#define _CRC - -/************************************* DAC ************************************/ -//#define _DAC - -/************************************* DBGMCU *********************************/ -//#define _DBGMCU - -/************************************* DMA ************************************/ -//#define _DMA -//#define _DMA1_Channel1 -//#define _DMA1_Channel2 -//#define _DMA1_Channel3 -//#define _DMA1_Channel4 -//#define _DMA1_Channel5 -//#define _DMA1_Channel6 -//#define _DMA1_Channel7 -//#define _DMA2_Channel1 -//#define _DMA2_Channel2 -//#define _DMA2_Channel3 -//#define _DMA2_Channel4 -//#define _DMA2_Channel5 - -/************************************* EXTI ***********************************/ -#define _EXTI - -/************************************* FLASH and Option Bytes *****************/ -#define _FLASH -/* Uncomment the line below to enable FLASH program/erase/protections functions, - otherwise only FLASH configuration (latency, prefetch, half cycle) functions - are enabled */ -/* #define _FLASH_PROG */ - -/************************************* FSMC ***********************************/ -//#define _FSMC - -/************************************* GPIO ***********************************/ -#define _GPIO -#define _GPIOA -#define _GPIOB -#define _GPIOC -#define _GPIOD -#define _GPIOE -#define _GPIOF -#define _GPIOG -#define _AFIO - -/************************************* I2C ************************************/ -//#define _I2C -//#define _I2C1 -//#define _I2C2 - -/************************************* IWDG ***********************************/ -//#define _IWDG - -/************************************* NVIC ***********************************/ -#define _NVIC - -/************************************* PWR ************************************/ -#define _PWR - -/************************************* RCC ************************************/ -#define _RCC - -/************************************* RTC ************************************/ -#define _RTC - -/************************************* SDIO ***********************************/ -//#define _SDIO - -/************************************* SPI ************************************/ -//#define _SPI -//#define _SPI1 -//#define _SPI2 -//#define _SPI3 - -/************************************* SysTick ********************************/ -#define _SysTick - -/************************************* TIM ************************************/ -//#define _TIM -//#define _TIM1 -//#define _TIM2 -//#define _TIM3 -//#define _TIM4 -//#define _TIM5 -//#define _TIM6 -//#define _TIM7 -//#define _TIM8 - -/************************************* USART **********************************/ -//#define _USART -//#define _USART1 -//#define _USART2 -//#define _USART3 -//#define _UART4 -//#define _UART5 - -/************************************* WWDG ***********************************/ -//#define _WWDG - -/* In the following line adjust the value of External High Speed oscillator (HSE) - used in your application */ -#define HSE_Value ((u32)8000000) /* Value of the External oscillator in Hz*/ - -/* Exported macro ------------------------------------------------------------*/ -#ifdef DEBUG -/******************************************************************************* -* Macro Name : assert_param -* Description : The assert_param macro is used for function's parameters check. -* It is used only if the library is compiled in DEBUG mode. -* Input : - 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. -* Return : None -*******************************************************************************/ - #define assert_param(expr) ((expr) ? (void)0 : assert_failed((u8 *)__FILE__, __LINE__)) -/* Exported functions ------------------------------------------------------- */ - void assert_failed(u8* file, u32 line); -#else - #define assert_param(expr) ((void)0) -#endif /* DEBUG */ - -#endif /* __STM32F10x_CONF_H */ - -/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/ diff --git a/src/stm32lib/examples/PWR/STOP/stm32f10x_it.c b/src/stm32lib/examples/PWR/STOP/stm32f10x_it.c deleted file mode 100755 index 9cebedd..0000000 --- a/src/stm32lib/examples/PWR/STOP/stm32f10x_it.c +++ /dev/null @@ -1,844 +0,0 @@ -/******************** (C) COPYRIGHT 2008 STMicroelectronics ******************** -* File Name : stm32f10x_it.c -* Author : MCD Application Team -* Version : V2.0.1 -* Date : 06/13/2008 -* Description : Main Interrupt Service Routines. -* This file provides template for all exceptions handler -* and peripherals interrupt service routine. -******************************************************************************** -* 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. -*******************************************************************************/ - -/* Includes ------------------------------------------------------------------*/ -#include "stm32f10x_it.h" -#include "platform_config.h" - -/* Private typedef -----------------------------------------------------------*/ -/* Private define ------------------------------------------------------------*/ -/* Private macro -------------------------------------------------------------*/ -/* Private variables ---------------------------------------------------------*/ -vu32 TimingDelay = 0; - -/* Private function prototypes -----------------------------------------------*/ -/* Private functions ---------------------------------------------------------*/ - -/******************************************************************************* -* Function Name : NMIException -* Description : This function handles NMI exception. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void NMIException(void) -{ -} - -/******************************************************************************* -* Function Name : HardFaultException -* Description : This function handles Hard Fault exception. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void HardFaultException(void) -{ - /* Go to infinite loop when Hard Fault exception occurs */ - while (1) - { - } -} - -/******************************************************************************* -* Function Name : MemManageException -* Description : This function handles Memory Manage exception. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void MemManageException(void) -{ - /* Go to infinite loop when Memory Manage exception occurs */ - while (1) - { - } -} - -/******************************************************************************* -* Function Name : BusFaultException -* Description : This function handles Bus Fault exception. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void BusFaultException(void) -{ - /* Go to infinite loop when Bus Fault exception occurs */ - while (1) - { - } -} - -/******************************************************************************* -* Function Name : UsageFaultException -* Description : This function handles Usage Fault exception. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void UsageFaultException(void) -{ - /* Go to infinite loop when Usage Fault exception occurs */ - while (1) - { - } -} - -/******************************************************************************* -* Function Name : DebugMonitor -* Description : This function handles Debug Monitor exception. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DebugMonitor(void) -{ -} - -/******************************************************************************* -* Function Name : SVCHandler -* Description : This function handles SVCall exception. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void SVCHandler(void) -{ -} - -/******************************************************************************* -* Function Name : PendSVC -* Description : This function handles PendSVC exception. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void PendSVC(void) -{ -} - -/******************************************************************************* -* Function Name : SysTickHandler -* Description : This function handles SysTick Handler. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void SysTickHandler(void) -{ - TimingDelay--; -} - -/******************************************************************************* -* Function Name : WWDG_IRQHandler -* Description : This function handles WWDG interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void WWDG_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : PVD_IRQHandler -* Description : This function handles PVD interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void PVD_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TAMPER_IRQHandler -* Description : This function handles Tamper interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TAMPER_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : RTC_IRQHandler -* Description : This function handles RTC global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void RTC_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : FLASH_IRQHandler -* Description : This function handles Flash interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void FLASH_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : RCC_IRQHandler -* Description : This function handles RCC interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void RCC_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : EXTI0_IRQHandler -* Description : This function handles External interrupt Line 0 request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void EXTI0_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : EXTI1_IRQHandler -* Description : This function handles External interrupt Line 1 request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void EXTI1_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : EXTI2_IRQHandler -* Description : This function handles External interrupt Line 2 request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void EXTI2_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : EXTI3_IRQHandler -* Description : This function handles External interrupt Line 3 request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void EXTI3_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : EXTI4_IRQHandler -* Description : This function handles External interrupt Line 4 request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void EXTI4_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA1_Channel1_IRQHandler -* Description : This function handles DMA1 Channel 1 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA1_Channel1_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA1_Channel2_IRQHandler -* Description : This function handles DMA1 Channel 2 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA1_Channel2_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA1_Channel3_IRQHandler -* Description : This function handles DMA1 Channel 3 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA1_Channel3_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA1_Channel4_IRQHandler -* Description : This function handles DMA1 Channel 4 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA1_Channel4_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA1_Channel5_IRQHandler -* Description : This function handles DMA1 Channel 5 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA1_Channel5_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA1_Channel6_IRQHandler -* Description : This function handles DMA1 Channel 6 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA1_Channel6_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA1_Channel7_IRQHandler -* Description : This function handles DMA1 Channel 7 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA1_Channel7_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : ADC1_2_IRQHandler -* Description : This function handles ADC1 and ADC2 global interrupts requests. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void ADC1_2_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : USB_HP_CAN_TX_IRQHandler -* Description : This function handles USB High Priority or CAN TX interrupts -* requests. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void USB_HP_CAN_TX_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : USB_LP_CAN_RX0_IRQHandler -* Description : This function handles USB Low Priority or CAN RX0 interrupts -* requests. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void USB_LP_CAN_RX0_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : CAN_RX1_IRQHandler -* Description : This function handles CAN RX1 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void CAN_RX1_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : CAN_SCE_IRQHandler -* Description : This function handles CAN SCE interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void CAN_SCE_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : EXTI9_5_IRQHandler -* Description : This function handles External lines 9 to 5 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void EXTI9_5_IRQHandler(void) -{ - if(EXTI_GetITStatus(EXTI_LINE_KEY_BUTTON) != RESET) - { - /* Clear the Key Button EXTI line pending bit */ - EXTI_ClearITPendingBit(EXTI_LINE_KEY_BUTTON); - - /* Toggle Led connected to GPIO_LED pin7 */ - GPIO_WriteBit(GPIO_LED, GPIO_Pin_7, (BitAction)(1-GPIO_ReadOutputDataBit(GPIO_LED, GPIO_Pin_7))); - } -} - -/******************************************************************************* -* Function Name : TIM1_BRK_IRQHandler -* Description : This function handles TIM1 Break interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM1_BRK_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM1_UP_IRQHandler -* Description : This function handles TIM1 overflow and update interrupt -* request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM1_UP_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM1_TRG_COM_IRQHandler -* Description : This function handles TIM1 Trigger and commutation interrupts -* requests. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM1_TRG_COM_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM1_CC_IRQHandler -* Description : This function handles TIM1 capture compare interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM1_CC_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM2_IRQHandler -* Description : This function handles TIM2 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM2_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM3_IRQHandler -* Description : This function handles TIM3 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM3_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM4_IRQHandler -* Description : This function handles TIM4 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM4_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : I2C1_EV_IRQHandler -* Description : This function handles I2C1 Event interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void I2C1_EV_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : I2C1_ER_IRQHandler -* Description : This function handles I2C1 Error interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void I2C1_ER_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : I2C2_EV_IRQHandler -* Description : This function handles I2C2 Event interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void I2C2_EV_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : I2C2_ER_IRQHandler -* Description : This function handles I2C2 Error interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void I2C2_ER_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : SPI1_IRQHandler -* Description : This function handles SPI1 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void SPI1_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : SPI2_IRQHandler -* Description : This function handles SPI2 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void SPI2_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : USART1_IRQHandler -* Description : This function handles USART1 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void USART1_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : USART2_IRQHandler -* Description : This function handles USART2 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void USART2_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : USART3_IRQHandler -* Description : This function handles USART3 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void USART3_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : EXTI15_10_IRQHandler -* Description : This function handles External lines 15 to 10 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void EXTI15_10_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : RTCAlarm_IRQHandler -* Description : This function handles RTC Alarm interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void RTCAlarm_IRQHandler(void) -{ - if(RTC_GetITStatus(RTC_IT_ALR) != RESET) - { - /* Toggle Led connected to GPIO_LED Pin8 */ - GPIO_WriteBit(GPIO_LED, GPIO_Pin_8, (BitAction)(1-GPIO_ReadOutputDataBit(GPIO_LED, GPIO_Pin_8))); - - /* Clear EXTI line17 pending bit */ - EXTI_ClearITPendingBit(EXTI_Line17); - - /* Check if the Wake-Up flag is set */ - if(PWR_GetFlagStatus(PWR_FLAG_WU) != RESET) - { - /* Clear Wake Up flag */ - PWR_ClearFlag(PWR_FLAG_WU); - } - - /* Wait until last write operation on RTC registers has finished */ - RTC_WaitForLastTask(); - /* Clear RTC Alarm interrupt pending bit */ - RTC_ClearITPendingBit(RTC_IT_ALR); - /* Wait until last write operation on RTC registers has finished */ - RTC_WaitForLastTask(); - } -} - -/******************************************************************************* -* Function Name : USBWakeUp_IRQHandler -* Description : This function handles USB WakeUp interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void USBWakeUp_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM8_BRK_IRQHandler -* Description : This function handles TIM8 Break interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM8_BRK_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM8_UP_IRQHandler -* Description : This function handles TIM8 overflow and update interrupt -* request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM8_UP_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM8_TRG_COM_IRQHandler -* Description : This function handles TIM8 Trigger and commutation interrupts -* requests. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM8_TRG_COM_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM8_CC_IRQHandler -* Description : This function handles TIM8 capture compare interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM8_CC_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : ADC3_IRQHandler -* Description : This function handles ADC3 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void ADC3_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : FSMC_IRQHandler -* Description : This function handles FSMC global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void FSMC_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : SDIO_IRQHandler -* Description : This function handles SDIO global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void SDIO_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM5_IRQHandler -* Description : This function handles TIM5 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM5_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : SPI3_IRQHandler -* Description : This function handles SPI3 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void SPI3_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : UART4_IRQHandler -* Description : This function handles UART4 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void UART4_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : UART5_IRQHandler -* Description : This function handles UART5 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void UART5_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM6_IRQHandler -* Description : This function handles TIM6 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM6_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM7_IRQHandler -* Description : This function handles TIM7 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM7_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA2_Channel1_IRQHandler -* Description : This function handles DMA2 Channel 1 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA2_Channel1_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA2_Channel2_IRQHandler -* Description : This function handles DMA2 Channel 2 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA2_Channel2_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA2_Channel3_IRQHandler -* Description : This function handles DMA2 Channel 3 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA2_Channel3_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA2_Channel4_5_IRQHandler -* Description : This function handles DMA2 Channel 4 and DMA2 Channel 5 -* interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA2_Channel4_5_IRQHandler(void) -{ -} - -/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/ diff --git a/src/stm32lib/examples/PWR/STOP/stm32f10x_it.h b/src/stm32lib/examples/PWR/STOP/stm32f10x_it.h deleted file mode 100755 index e74b6cc..0000000 --- a/src/stm32lib/examples/PWR/STOP/stm32f10x_it.h +++ /dev/null @@ -1,100 +0,0 @@ -/******************** (C) COPYRIGHT 2008 STMicroelectronics ******************** -* File Name : stm32f10x_it.h -* Author : MCD Application Team -* Version : V2.0.1 -* Date : 06/13/2008 -* Description : This file contains the headers of the interrupt handlers. -******************************************************************************** -* 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. -*******************************************************************************/ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32F10x_IT_H -#define __STM32F10x_IT_H - -/* Includes ------------------------------------------------------------------*/ -#include "stm32f10x_lib.h" - -/* Exported types ------------------------------------------------------------*/ -/* Exported constants --------------------------------------------------------*/ -/* Exported macro ------------------------------------------------------------*/ -/* Exported functions ------------------------------------------------------- */ - -void NMIException(void); -void HardFaultException(void); -void MemManageException(void); -void BusFaultException(void); -void UsageFaultException(void); -void DebugMonitor(void); -void SVCHandler(void); -void PendSVC(void); -void SysTickHandler(void); -void WWDG_IRQHandler(void); -void PVD_IRQHandler(void); -void TAMPER_IRQHandler(void); -void RTC_IRQHandler(void); -void FLASH_IRQHandler(void); -void RCC_IRQHandler(void); -void EXTI0_IRQHandler(void); -void EXTI1_IRQHandler(void); -void EXTI2_IRQHandler(void); -void EXTI3_IRQHandler(void); -void EXTI4_IRQHandler(void); -void DMA1_Channel1_IRQHandler(void); -void DMA1_Channel2_IRQHandler(void); -void DMA1_Channel3_IRQHandler(void); -void DMA1_Channel4_IRQHandler(void); -void DMA1_Channel5_IRQHandler(void); -void DMA1_Channel6_IRQHandler(void); -void DMA1_Channel7_IRQHandler(void); -void ADC1_2_IRQHandler(void); -void USB_HP_CAN_TX_IRQHandler(void); -void USB_LP_CAN_RX0_IRQHandler(void); -void CAN_RX1_IRQHandler(void); -void CAN_SCE_IRQHandler(void); -void EXTI9_5_IRQHandler(void); -void TIM1_BRK_IRQHandler(void); -void TIM1_UP_IRQHandler(void); -void TIM1_TRG_COM_IRQHandler(void); -void TIM1_CC_IRQHandler(void); -void TIM2_IRQHandler(void); -void TIM3_IRQHandler(void); -void TIM4_IRQHandler(void); -void I2C1_EV_IRQHandler(void); -void I2C1_ER_IRQHandler(void); -void I2C2_EV_IRQHandler(void); -void I2C2_ER_IRQHandler(void); -void SPI1_IRQHandler(void); -void SPI2_IRQHandler(void); -void USART1_IRQHandler(void); -void USART2_IRQHandler(void); -void USART3_IRQHandler(void); -void EXTI15_10_IRQHandler(void); -void RTCAlarm_IRQHandler(void); -void USBWakeUp_IRQHandler(void); -void TIM8_BRK_IRQHandler(void); -void TIM8_UP_IRQHandler(void); -void TIM8_TRG_COM_IRQHandler(void); -void TIM8_CC_IRQHandler(void); -void ADC3_IRQHandler(void); -void FSMC_IRQHandler(void); -void SDIO_IRQHandler(void); -void TIM5_IRQHandler(void); -void SPI3_IRQHandler(void); -void UART4_IRQHandler(void); -void UART5_IRQHandler(void); -void TIM6_IRQHandler(void); -void TIM7_IRQHandler(void); -void DMA2_Channel1_IRQHandler(void); -void DMA2_Channel2_IRQHandler(void); -void DMA2_Channel3_IRQHandler(void); -void DMA2_Channel4_5_IRQHandler(void); - -#endif /* __STM32F10x_IT_H */ - -/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/ -- cgit v1.2.3