; generated by Component: ARM Compiler 5.05 update 1 (build 106) Tool: ArmCC [4d0efa]
; commandline ArmCC [--c99 --list --split_sections --debug -c --asm --interleave -o..\output\cmp_analoglvr.o --asm_dir=..\List\ --list_dir=..\List\ --depend=..\output\cmp_analoglvr.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 -ID:\Keil5\ARM\Pack\Keil\SC32F10xx_DFP\1.0.0\Device\SC32F10xx\FWLib\SC32_Lib\inc -ID:\Keil5\ARM\Pack\Keil\SC32F10xx_DFP\1.0.0\Device\SH32F2xx\Include -D__UVISION_VERSION=538 -DSC32F10xx --omf_browse=..\output\cmp_analoglvr.crf ..\Apps\CMP_AnalogLVR.c]
                          THUMB

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

                  CMP_AnalogLVR_CMPHandler PROC
;;;50     
;;;51     void CMP_AnalogLVR_CMPHandler(void)
000000  b510              PUSH     {r4,lr}
;;;52     {
;;;53       /* ж */
;;;54       if(CMP_GetFlagStatus(CMP, CMP_FLAG_IF)) //жCMP־λ
000002  4c07              LDR      r4,|L1.32|
000004  2101              MOVS     r1,#1
000006  4620              MOV      r0,r4
000008  f7fffffe          BL       CMP_GetFlagStatus
00000c  2800              CMP      r0,#0
00000e  d006              BEQ      |L1.30|
;;;55       {
;;;56         CMP_ClearFlag(CMP, CMP_FLAG_IF); //CMP־λ
000010  2101              MOVS     r1,#1
000012  4620              MOV      r0,r4
000014  f7fffffe          BL       CMP_ClearFlag
;;;57         CMP_Flag = SET;
000018  4902              LDR      r1,|L1.36|
00001a  2001              MOVS     r0,#1
00001c  7008              STRB     r0,[r1,#0]
                  |L1.30|
;;;58       }
;;;59     }
00001e  bd10              POP      {r4,pc}
                          ENDP

                  |L1.32|
                          DCD      0x40022130
                  |L1.36|
                          DCD      ||.data||

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

                  CMP_AnalogLVR_Function PROC
;;;13     
;;;14     void CMP_AnalogLVR_Function(void)
000000  b51c              PUSH     {r2-r4,lr}
;;;15     {
;;;16       volatile uint16_t CMP_Value;
;;;17       CMP_InitTypeDef CMP_InitStruct; //CMPʼṹ
;;;18     
;;;19       RCC_APB2Cmd(ENABLE);  //CMPAPB2ʱ
000002  2001              MOVS     r0,#1
000004  f7fffffe          BL       RCC_APB2Cmd
;;;20       CMP_Cmd(CMP, ENABLE);	//ʹCMP
000008  4c15              LDR      r4,|L2.96|
00000a  2101              MOVS     r1,#1
00000c  4620              MOV      r0,r4
00000e  f7fffffe          BL       CMP_Cmd
;;;21     
;;;22       /* 룬CMPжϴΪ VDD < 1.5V/10*16 = 2.4V */
;;;23       CMP_InitStruct.CMP_Negative = CMP_Negative_10D16VDD;  //CMPΪ10/16 VDD
000012  2105              MOVS     r1,#5
000014  0249              LSLS     r1,r1,#9
000016  4668              MOV      r0,sp
000018  8001              STRH     r1,[r0,#0]
;;;24       CMP_InitStruct.CMP_Positive = CMP_Positive_1_5V;  //CMPΪڲ1.5V׼Դ
00001a  2110              MOVS     r1,#0x10
00001c  8041              STRH     r1,[r0,#2]
;;;25       CMP_InitStruct.CMP_TriggerMode = CMP_TriggerMode_RISE; //VDDСʱڸƱ仯
00001e  2120              MOVS     r1,#0x20
000020  8081              STRH     r1,[r0,#4]
;;;26     
;;;27       CMP_Init(CMP, &CMP_InitStruct); //ݽṹ־λCMP
000022  4669              MOV      r1,sp
000024  4620              MOV      r0,r4
000026  f7fffffe          BL       CMP_Init
;;;28     
;;;29       CMP_ClearFlag(CMP, CMP_FLAG_IF); //CMP־λ
00002a  2101              MOVS     r1,#1
00002c  4620              MOV      r0,r4
00002e  f7fffffe          BL       CMP_ClearFlag
000032  2101              MOVS     r1,#1
000034  480b              LDR      r0,|L2.100|
000036  0789              LSLS     r1,r1,#30
000038  6001              STR      r1,[r0,#0]
;;;30     
;;;31       NVIC_EnableIRQ(CMP_IRQn);
;;;32     
;;;33     	printf("CMP Analog LVR Initialization successful!\r\n");
00003a  a00b              ADR      r0,|L2.104|
00003c  f7fffffe          BL       __2printf
;;;34       /* жϳʼ״̬ǷѴڸˣֱӸλ */
;;;35       if(CMP_GetCMPSTA(CMP) == CMP_CMPSTA_High)
000040  4620              MOV      r0,r4
000042  f7fffffe          BL       CMP_GetCMPSTA
000046  2802              CMP      r0,#2
000048  d005              BEQ      |L2.86|
;;;36       {
;;;37     		printf("CMP Analog LVR Reset!\r\n");
;;;38         NVIC_SystemReset();//λ
;;;39       }
;;;40       while(1)
;;;41     	{
;;;42     		if(CMP_Flag == SET)
00004a  4812              LDR      r0,|L2.148|
                  |L2.76|
00004c  7801              LDRB     r1,[r0,#0]  ; CMP_Flag
00004e  2901              CMP      r1,#1
000050  d1fc              BNE      |L2.76|
;;;43     		{
;;;44     			CMP_Flag = RESET;
000052  2100              MOVS     r1,#0
000054  7001              STRB     r1,[r0,#0]
                  |L2.86|
000056  a010              ADR      r0,|L2.152|
000058  f7fffffe          BL       __2printf
00005c  f7fffffe          BL       __NVIC_SystemReset
;;;45     	    printf("CMP Analog LVR Reset!\r\n");
;;;46           NVIC_SystemReset();//λ
;;;47     		}
;;;48     	}
;;;49     }
;;;50     
                          ENDP

                  |L2.96|
                          DCD      0x40022130
                  |L2.100|
                          DCD      0xe000e100
                  |L2.104|
000068  434d5020          DCB      "CMP Analog LVR Initialization successful!\r\n",0
00006c  416e616c
000070  6f67204c
000074  56522049
000078  6e697469
00007c  616c697a
000080  6174696f
000084  6e207375
000088  63636573
00008c  7366756c
000090  210d0a00
                  |L2.148|
                          DCD      ||.data||
                  |L2.152|
000098  434d5020          DCB      "CMP Analog LVR Reset!\r\n",0
00009c  416e616c
0000a0  6f67204c
0000a4  56522052
0000a8  65736574
0000ac  210d0a00

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

                  __NVIC_SystemReset PROC
;;;982     */
;;;983    __NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void)
000000  f3bf8f4f          DSB      
;;;984    {
;;;985      __DSB();                                                          /* Ensure all outstanding memory accesses included
;;;986                                                                           buffered write are completed before reset */
;;;987      SCB->AIRCR  = ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
000004  4904              LDR      r1,|L3.24|
000006  4803              LDR      r0,|L3.20|
000008  60c8              STR      r0,[r1,#0xc]
;;;988                     SCB_AIRCR_SYSRESETREQ_Msk);
;;;989      __DSB();                                                          /* Ensure completion of memory access */
00000a  f3bf8f4f          DSB      
                  |L3.14|
;;;990    
;;;991      for(;;)                                                           /* wait until reset */
;;;992      {
;;;993        __NOP();
00000e  bf00              NOP      
000010  e7fd              B        |L3.14|
;;;994      }
;;;995    }
;;;996    
                          ENDP

000012  0000              DCW      0x0000
                  |L3.20|
                          DCD      0x05fa0004
                  |L3.24|
                          DCD      0xe000ed00

                          AREA ||.data||, DATA, ALIGN=0

                  CMP_Flag
000000  00                DCB      0x00

;*** Start embedded assembler ***

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

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

 revsh r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***
