; generated by Component: ARM Compiler 5.06 update 7 (build 960) Tool: ArmCC [4d365d]
; commandline ArmCC [--c99 --list --split_sections --debug -c --asm --interleave -o..\output\stop_idle_wakeup_example.o --asm_dir=..\List\ --list_dir=..\List\ --depend=..\output\stop_idle_wakeup_example.d --cpu=Cortex-M0+ --apcs=interwork --diag_suppress=9931 -I..\FWLib\SC32F1XXX_Lib\inc -I..\User\HeadFiles -I..\User -I..\Drivers -I..\Apps -I..\CMSIS -IF:\Users\SOC\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\Device\ARM\ARMCM0plus\Include -D__UVISION_VERSION=536 -DARMCM0P -DSC32f10xx --omf_browse=..\output\stop_idle_wakeup_example.crf ..\Apps\STOP_IDLE_WakeUp_Example.c]
                          THUMB

                          AREA ||i.BTM_WakeUp_BTMHandler||, CODE, READONLY, ALIGN=2

                  BTM_WakeUp_BTMHandler PROC
;;;79     //BTM中断
;;;80     void BTM_WakeUp_BTMHandler(void)
000000  b510              PUSH     {r4,lr}
;;;81     {
;;;82       /* 判断BTM中断是否置起 */
;;;83       if(BTM_GetFlagStatus(BTM,BTM_FLAG_IF) == SET)
000002  4c06              LDR      r4,|L1.28|
000004  2101              MOVS     r1,#1
000006  4620              MOV      r0,r4
000008  f7fffffe          BL       BTM_GetFlagStatus
00000c  2801              CMP      r0,#1
00000e  d103              BNE      |L1.24|
;;;84       {
;;;85         BTM_ClearFlag(BTM,BTM_FLAG_IF);	//清除BTM中断标志
000010  2101              MOVS     r1,#1
000012  4620              MOV      r0,r4
000014  f7fffffe          BL       BTM_ClearFlag
                  |L1.24|
;;;86       }
;;;87     }
000018  bd10              POP      {r4,pc}
;;;88     
                          ENDP

00001a  0000              DCW      0x0000
                  |L1.28|
                          DCD      0x40022100

                          AREA ||i.INT_WakeUp_INT0Handler||, CODE, READONLY, ALIGN=1

                  INT_WakeUp_INT0Handler PROC
;;;89     //INT中断
;;;90     void INT_WakeUp_INT0Handler(void)
000000  b510              PUSH     {r4,lr}
;;;91     {
;;;92       if(INT_GetFlagStatus(INT_Channel_0, INT_Flag_Rising)) //判断INT0标志位
000002  2101              MOVS     r1,#1
000004  4608              MOV      r0,r1
000006  f7fffffe          BL       INT_GetFlagStatus
00000a  2800              CMP      r0,#0
00000c  d002              BEQ      |L2.20|
;;;93       {
;;;94           INT_ClearFlag(INT_Channel_0);
00000e  2001              MOVS     r0,#1
000010  f7fffffe          BL       INT_ClearFlag
                  |L2.20|
;;;95       }
;;;96     }
000014  bd10              POP      {r4,pc}
;;;97     
                          ENDP


                          AREA ||i.STOP_IDLE_WakeUp_Function||, CODE, READONLY, ALIGN=2

                  STOP_IDLE_WakeUp_Function PROC
;;;21     
;;;22     void STOP_IDLE_WakeUp_Function(void)
000000  b51c              PUSH     {r2-r4,lr}
;;;23     {
;;;24       GPIO_InitTypeDef GPIO_InitStruct; //定义GPIO初始化结构体变量
;;;25       /* PA10设置为推挽输出 */
;;;26       GPIO_InitStruct.GPIO_Pin = GPIO_Pin_10;
000002  2001              MOVS     r0,#1
000004  0280              LSLS     r0,r0,#10
000006  4669              MOV      r1,sp
000008  8008              STRH     r0,[r1,#0]
;;;27       GPIO_InitStruct.GPIO_Mode = GPIO_Mode_OUT_PP;
00000a  2002              MOVS     r0,#2
;;;28       GPIO_Init(GPIOA, &GPIO_InitStruct);
00000c  4c15              LDR      r4,|L3.100|
00000e  8048              STRH     r0,[r1,#2]            ;27
000010  4620              MOV      r0,r4
000012  f7fffffe          BL       GPIO_Init
;;;29     	
;;;30     #if (WakeUp_Mode == 0)
;;;31       /* BTM配置 */
;;;32       RCC_Unlock(0xFF);
000016  20ff              MOVS     r0,#0xff
000018  f7fffffe          BL       RCC_Unlock
;;;33       RCC_LIRCCmd(ENABLE);//使能LIRC
00001c  2001              MOVS     r0,#1
00001e  f7fffffe          BL       RCC_LIRCCmd
;;;34     #if defined(SC32f10xx)|| defined(SC32f12xx)
;;;35       RCC_APB2Cmd(ENABLE);//使能BTM时钟
000022  2001              MOVS     r0,#1
000024  f7fffffe          BL       RCC_APB2Cmd
;;;36     
;;;37     #endif	
;;;38       BTM_FSConfig(BTM,BTM_FreqSelect_500MS);//BTM定时时间设置
000028  4e0f              LDR      r6,|L3.104|
00002a  2105              MOVS     r1,#5
00002c  4630              MOV      r0,r6
00002e  f7fffffe          BL       BTM_FSConfig
;;;39       BTM_ITConfig(BTM,BTM_IT_INT,ENABLE);//使能BTM中断
000032  2201              MOVS     r2,#1
000034  2140              MOVS     r1,#0x40
000036  4630              MOV      r0,r6
000038  f7fffffe          BL       BTM_ITConfig
00003c  2501              MOVS     r5,#1
00003e  490b              LDR      r1,|L3.108|
000040  2040              MOVS     r0,#0x40
000042  6008              STR      r0,[r1,#0]
;;;40       NVIC_EnableIRQ(BTM_IRQn);
;;;41       
;;;42       BTM_Cmd(BTM,ENABLE);//使能BTM外设
000044  4629              MOV      r1,r5
000046  4630              MOV      r0,r6
000048  f7fffffe          BL       BTM_Cmd
                  |L3.76|
;;;43     #elif(WakeUp_Mode == 1)
;;;44       INT_InitTypeDef INT_InitStruct; //定义INT初始化结构体变量
;;;45       
;;;46       //PA0设置为上升沿中断
;;;47       INT_InitStruct.INT_Channel = INT_Channel_0;
;;;48       INT_InitStruct.INT_INTSEL = INT_INTSEL_PA;
;;;49       INT_InitStruct.INT_Trigger = INT_Trigger_Rising;
;;;50       INT_Init(&INT_InitStruct);
;;;51       
;;;52       /* 开启对应的中断 */
;;;53       INT_ITConfig(INT_Channel_0, INT_IT_Rising, ENABLE);
;;;54       NVIC_EnableIRQ(INT0_IRQn);
;;;55     	
;;;56     #endif
;;;57       while(1)
;;;58       {
;;;59     #if (IC_Mode == 0)
;;;60         printf("Enter STOP mode!\r\n");
;;;61         PWR_EnterSTOPMode(PWR_STOPEntry_WFI);//进入STOP模式
;;;62         SC_Init(); //重新初始化时钟
;;;63         
;;;64     #elif(IC_Mode == 1)
;;;65         printf("Enter IDLE mode!\r\n");
00004c  a008              ADR      r0,|L3.112|
00004e  f7fffffe          BL       __2printf
;;;66         PWR_EnterIDLEMode(PWR_IDLEEntry_WFI);//进入IDLE模式	
000052  2001              MOVS     r0,#1
000054  f7fffffe          BL       PWR_EnterIDLEMode
;;;67     #endif
;;;68         
;;;69         PA_OT(10); //PA10翻转
000058  76a5              STRB     r5,[r4,#0x1a]
;;;70         
;;;71     #if (WakeUp_Mode == 0)
;;;72         printf("Woken up by BTM interrupt!\r\n");
00005a  a00a              ADR      r0,|L3.132|
00005c  f7fffffe          BL       __2printf
000060  e7f4              B        |L3.76|
;;;73     #elif(WakeUp_Mode == 1)
;;;74         printf("Woken up by INT interrupt!\r\n");
;;;75     #endif
;;;76       }
;;;77     }
;;;78     
                          ENDP

000062  0000              DCW      0x0000
                  |L3.100|
                          DCD      0x40011000
                  |L3.104|
                          DCD      0x40022100
                  |L3.108|
                          DCD      0xe000e100
                  |L3.112|
000070  456e7465          DCB      "Enter IDLE mode!\r\n",0
000074  72204944
000078  4c45206d
00007c  6f646521
000080  0d0a00  
000083  00                DCB      0
                  |L3.132|
000084  576f6b65          DCB      "Woken up by BTM interrupt!\r\n",0
000088  6e207570
00008c  20627920
000090  42544d20
000094  696e7465
000098  72727570
00009c  74210d0a
0000a0  00      
0000a1  00                DCB      0
0000a2  00                DCB      0
0000a3  00                DCB      0

;*** Start embedded assembler ***

#line 1 "..\\Apps\\STOP_IDLE_WakeUp_Example.c"
	AREA ||.rev16_text||, CODE
	THUMB
	EXPORT |__asm___26_STOP_IDLE_WakeUp_Example_c_95f1cd3c____REV16|
#line 463 "..\\CMSIS\\cmsis_armcc.h"
|__asm___26_STOP_IDLE_WakeUp_Example_c_95f1cd3c____REV16| PROC
#line 464

 rev16 r0, r0
 bx lr
	ENDP
	AREA ||.revsh_text||, CODE
	THUMB
	EXPORT |__asm___26_STOP_IDLE_WakeUp_Example_c_95f1cd3c____REVSH|
#line 478
|__asm___26_STOP_IDLE_WakeUp_Example_c_95f1cd3c____REVSH| PROC
#line 479

 revsh r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***
