<meter id="pryje"><nav id="pryje"><delect id="pryje"></delect></nav></meter>
          <label id="pryje"></label>

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計應(yīng)用 > STM32f103-實例睡眠模式的喚醒

          STM32f103-實例睡眠模式的喚醒

          作者: 時間:2016-11-17 來源:網(wǎng)絡(luò) 收藏
          main.c

          /***************************************************************************/
          // environment : writ by Chen maolin in 2010/9/23 on Kiel 4.0
          // finktion : about a projiect to setup EXTI
          //hardware optimization :
          // update :2010/9/26 陳茂林
          /**************************************************************************/
          #include "stm32f10x_lib.h"
          #include "platform_config.h"
          #include

          本文引用地址:http://www.ex-cimer.com/article/201611/315440.htm


          extern vu32 TimingDelay ;
          ErrorStatus HSEStartUpStatus;

          void SYSCLKconfig_STOP(void);
          void RCC_Configuration(void);
          void EXTI_Configuration(void);
          void GPIO_Configuration(void);
          void NVIC_Configuration(void);
          void RTC_Configuration (void);
          void SysTick_Configuration(void);
          void Delay(vu32 nCount);

          int main(void)
          {
          #ifdef DEBUG
          debug();
          #endif
          RCC_Configuration();
          RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR|RCC_APB1Periph_BKP,ENABLE );
          GPIO_Configuration();
          EXTI_Configuration();
          RTC_Configuration ();
          NVIC_Configuration();
          SysTick_Configuration();

          while (1)
          {
          Delay(200);/*延時2s*/
          RTC_ClearFlag(RTC_FLAG_SEC); /*清秒中斷標(biāo)志位*/
          while(RTC_GetFlagStatus(RTC_FLAG_SEC)==RESET);/*等待秒中斷*//*意思是要等1s才有反應(yīng)*/
          RTC_SetAlarm(RTC_GetCounter()+3);/*設(shè)置秒報警中斷*/
          RTC_WaitForLastTask(); /*等待最后一條寫命令*/
          GPIO_SetBits(GPIOB,GPIO_Pin_6);
          GPIO_ResetBits(GPIOB,GPIO_Pin_7);
          PWR_EnterSTOPMode( PWR_Regulator_ON, PWR_STOPEntry_WFI ); /*這條是睡眠;PLL時鐘停止,
          PC指令停止執(zhí)行,一但有中斷服務(wù)程序觸發(fā)會使得PC指令向下執(zhí)行但我們還需要通過一個函數(shù)恢復(fù)
          他的PLL時鐘**/
          GPIO_ResetBits(GPIOB,GPIO_Pin_6);
          SYSCLKconfig_STOP();
          GPIO_SetBits(GPIOB,GPIO_Pin_7);

          }
          }

          /*******************************************************************************
          * Function Name : RCC_Configuration
          * Description : Configures the different system clocks.
          * Input : None
          * Output : None
          * Return : None
          *******************************************************************************/
          void RCC_Configuration(void) /*初始時鐘*/
          {
          RCC_DeInit(); /* RCC system reset(for debug purpose) */
          RCC_HSEConfig(RCC_HSE_ON); /* Enable HSE */
          HSEStartUpStatus = RCC_WaitForHSEStartUp(); /* Wait till HSE is ready */

          if(HSEStartUpStatus == SUCCESS)
          {
          FLASH_PrefetchBufferCmd(FLASH_PrefetchBuffer_Enable); /* Enable Prefetch Buffer */
          FLASH_SetLatency(FLASH_Latency_2); /* Flash 2 wait state */
          RCC_HCLKConfig(RCC_SYSCLK_Div1); /* HCLK = SYSCLK */
          RCC_PCLK2Config(RCC_HCLK_Div1); /* PCLK2 = HCLK */
          RCC_PCLK1Config(RCC_HCLK_Div2); /* PCLK1 = HCLK/2 */
          RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_9); /* PLLCLK = 8MHz * 9 = 72 MHz */
          RCC_PLLCmd(ENABLE); /* Enable PLL */

          RCC_APB2PeriphClockCmd( RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB| /*總線APB2周圍時鐘設(shè)置*/
          RCC_APB2Periph_GPIOC | RCC_APB2Periph_AFIO ,
          ENABLE
          );

          while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET) /* Wait till PLL is ready */
          {

          }
          RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK); /* Select PLL as system clock source */
          while(RCC_GetSYSCLKSource() != 0x08) /* Wait till PLL is used as system clock source */
          {
          }
          }
          }


          /*******************************************************************************
          * Function Name : 從停機(jī)模式下喚醒之后: 配置系統(tǒng)時鐘允許HSE,和 pll 作為系統(tǒng)時鐘。
          * Description : Inserts a delay time.
          * Input : None
          * Output : None
          * Return : None
          *******************************************************************************/
          void SYSCLKconfig_STOP(void)
          {
          RCC_HSEConfig(RCC_HSE_ON); /*HSES使能*/
          HSEStartUpStatus = RCC_WaitForHSEStartUp(); /*等待*/
          if(HSEStartUpStatus == SUCCESS)
          {
          RCC_PLLCmd(ENABLE);/*使能*/
          while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY)== RESET); /*等待PLL有效*/
          RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK);/*將PLL作為系統(tǒng)時鐘*/
          while(RCC_GetSYSCLKSource() != 0x08);/*等待*/
          }
          }

          /*******************************************************************************
          * Function Name : GPIO_Configuration();
          * Description : GPIO SET
          * Input : nCount: None
          * Output : None
          * Return : None
          *******************************************************************************/
          void GPIO_Configuration(void)
          {
          GPIO_InitTypeDef GPIO_InitStructure;


          GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6 | GPIO_Pin_7 | GPIO_Pin_10 | GPIO_Pin_11|GPIO_Pin_12 | GPIO_Pin_12 | GPIO_Pin_13| GPIO_Pin_14|GPIO_Pin_15;
          GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
          GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
          GPIO_Init(GPIOB, &GPIO_InitStructure);//GPIO_InitStructure指向了GPIO_InitTypeDef ,GPIO_InitTypeDef結(jié)構(gòu)體包含了基本信息

          /* Configure Key Button GPIO Pin as input floating (Key Button EXTI Line) */

          GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5;
          GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
          GPIO_Init(GPIOB, &GPIO_InitStructure);
          }
          /*******************************************************************************
          * Function Name : GPIO_Configuration();
          * Description : GPIO SET
          * Input : nCount: None
          * Output : None
          * Return : None
          *******************************************************************************/
          void EXTI_Configuration(void)
          {
          EXTI_InitTypeDef EXTI_InitStructure;
          GPIO_EXTILineConfig(GPIO_PortSourceGPIOB, GPIO_PinSource5);
          /* Configure Key Button EXTI Line to generate an interrupt on falling edge */
          EXTI_InitStructure.EXTI_Line = EXTI_Line5;
          EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
          EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling;
          EXTI_InitStructure.EXTI_LineCmd = ENABLE;
          EXTI_Init(&EXTI_InitStructure);

          /*配置EXTI_Line17(RTC_Alarm)為上升沿觸發(fā)*/
          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 : PTC_clclk
          * Input : None
          * Output : None
          * Return : None
          *******************************************************************************/
          void RTC_Configuration (void)
          {
          /*配置RTC時鐘源*/
          /* 允許訪問BKP*/
          PWR_BackupAccessCmd(ENABLE);
          /*復(fù)位備份域*/
          BKP_DeInit();
          /*允許LSE*/
          RCC_LSEConfig(RCC_LSE_ON);
          /*等待LSE有效*/
          while (RCC_GetFlagStatus(RCC_FLAG_LSERDY)==RESET) ;
          /*選擇LSE做為RTC時鐘 */
          RCC_RTCCLKConfig(RCC_RTCCLKSource_LSE);
          /*允許RTC時鐘*/
          RCC_RTCCLKCmd(ENABLE);

          /*配置RTC*/
          /*等待RTC APB同步*/
          RTC_WaitForSynchro();

          /*預(yù)分頻值為1s*/

          RTC_SetPrescaler(32767);

          /*等待最后一條寫指令完成*/

          RTC_WaitForLastTask();

          /*允許RTC報警中斷*/
          RTC_ITConfig(RTC_IT_ALR, ENABLE);

          /*等待最后一條寫指令完成*/
          RTC_WaitForLastTask();
          }

          /*******************************************************************************
          * Function Name : NVIC_Configuration
          * Description : Configures Vector Table base location.
          * Input : None
          * Output : None
          * Return : None
          *******************************************************************************/
          void NVIC_Configuration(void)
          {
          NVIC_InitTypeDef NVIC_InitStruct;
          /*設(shè)置中斷向量基址為0x8000000*/
          NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x0);

          NVIC_PriorityGroupConfig(NVIC_PriorityGroup_1);

          NVIC_InitStruct.NVIC_IRQChannel= RTCAlarm_IRQChannel ;
          NVIC_InitStruct.NVIC_IRQChannelPreemptionPriority= 0;
          NVIC_InitStruct.NVIC_IRQChannelSubPriority= 0;
          NVIC_InitStruct.NVIC_IRQChannelCmd= ENABLE;
          NVIC_Init(&NVIC_InitStruct);

          NVIC_InitStruct.NVIC_IRQChannel= EXTI9_5_IRQChannel ;
          NVIC_InitStruct.NVIC_IRQChannelPreemptionPriority= 0;
          NVIC_Init(&NVIC_InitStruct);

          }

          /*******************************************************************************
          * Function Name : SysTick_Configuration
          * Description : 配置1ms時鐘
          * Input : None
          * Output : None
          * Return : None
          *******************************************************************************/
          void SysTick_Configuration(void)
          {
          /*選擇HCLK做為SysTick時鐘源 */
          SysTick_CLKSourceConfig(SysTick_CLKSource_HCLK);
          /*_SysTick設(shè)置為優(yōu)先級3 */
          NVIC_SystemHandlerPriorityConfig (SystemHandler_SysTick, 3,0 );
          /*1ms發(fā)生1次SysTick中斷對應(yīng)HCLK為72MHZ */
          SysTick_SetReload(72000);
          /* 允許SysTick中斷*/
          SysTick_ITConfig(ENABLE);
          }

          /*******************************************************************************
          * Function Name : Delay
          * Description : Inserts a delay time.
          * Input : nCount: specifies the delay time length.
          * Output : None
          * Return : None
          *******************************************************************************/
          void Delay(vu32 nTime)
          {
          /*允許SysTick計數(shù)器*/
          SysTick_CounterCmd(SysTick_Counter_Enable);
          TimingDelay =nTime ; /*TimingDelay是在定義it.c的一個
          變量用來在SysTick服務(wù)程序中自減*/
          while(TimingDelay!=0);
          SysTick_CounterCmd( SysTick_Counter_Disable);
          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 %drn", file, line) */

          /* Infinite loop */
          while (1)
          {

          }
          }
          #endif

          /******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/

          it.c

          /******************** (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"
          vu32 TimingDelay =0 ;
          extern void Delay(vu32 nTime);

          /* 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)
          {
          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_Line5)!=RESET)
          {
          GPIOB->ODR=0XFFFF;

          //GPIO_WriteBit(GPIOB,GPIO_Pin_6,(BitAction)(1-GPIO_ReadOutputDataBit(GPIOB,GPIO_Pin_6)));
          EXTI_ClearITPendingBit(EXTI_Line5);
          }

          }
          /*******************************************************************************
          * 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)
          {

          GPIOB->ODR=0Xfff;
          EXTI_ClearITPendingBit(EXTI_Line17);
          if(PWR_GetFlagStatus(PWR_FLAG_WU)!=RESET)
          {
          PWR_ClearFlag(PWR_FLAG_WU);
          }
          /*等待最后一條命令寫完成*/
          RTC_WaitForLastTask();
          /*清楚RTC報警掛起*/
          EXTI_ClearITPendingBit(RTC_IT_ALR);
          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****/



          關(guān)鍵詞: STM32f103睡眠模式喚

          評論


          技術(shù)專區(qū)

          關(guān)閉
          看屁屁www成人影院,亚洲人妻成人图片,亚洲精品成人午夜在线,日韩在线 欧美成人 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();