; 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\pwm_complementary.o --asm_dir=..\List\ --list_dir=..\List\ --depend=..\output\pwm_complementary.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\pwm_complementary.crf ..\Apps\PWM_Complementary.c]
                          THUMB

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

                  PWM_Complementary_Function PROC
;;;13     #if defined(SC32f10xx)||defined(SC32f12xx)
;;;14     void PWM_Complementary_Function(void)
000000  b51f              PUSH     {r0-r4,lr}
;;;15     {
;;;16       PWM_InitTypeDef PWM_InitStruct;
;;;17       
;;;18       /* 使能PWM0时钟 */
;;;19       RCC_APB0Cmd(ENABLE);
000002  2001              MOVS     r0,#1
000004  f7fffffe          BL       RCC_APB0Cmd
;;;20       RCC_APB0PeriphClockCmd(RCC_APB0Periph_PWM0,ENABLE);
000008  2101              MOVS     r1,#1
00000a  020c              LSLS     r4,r1,#8
00000c  4620              MOV      r0,r4
00000e  f7fffffe          BL       RCC_APB0PeriphClockCmd
;;;21       
;;;22       /* PWM配置结构体初始化 */
;;;23       PWM_StructInit(&PWM_InitStruct);
000012  4668              MOV      r0,sp
000014  f7fffffe          BL       PWM_StructInit
;;;24       
;;;25       /* 设置PWM配置结构体 */
;;;26       PWM_InitStruct.PWM_AlignedMode = PWM_AlignmentMode_Edge;	//PWM对齐模式为边沿对齐
000018  2200              MOVS     r2,#0
00001a  4669              MOV      r1,sp
;;;27       PWM_InitStruct.PWM_Cycle = (uint16_t)(32000000/1000);	        //PWM的频率为1000Hz
00001c  207d              MOVS     r0,#0x7d
00001e  804a              STRH     r2,[r1,#2]            ;26
000020  0200              LSLS     r0,r0,#8
000022  80c8              STRH     r0,[r1,#6]
;;;28       PWM_InitStruct.PWM_OutputChannel = PWM_Channel_0 | PWM_Channel_1;//使能PWM00输出
000024  2003              MOVS     r0,#3
;;;29       PWM_InitStruct.PWM_LowPolarityChannl = PWM_Channel_1;	//PWM01输出反向
000026  9002              STR      r0,[sp,#8]
000028  2002              MOVS     r0,#2
;;;30       PWM_InitStruct.PWM_Prescaler = PWM_PRESCALER_DIV1;	//PWM0时钟分频为1分配
00002a  9003              STR      r0,[sp,#0xc]
00002c  800a              STRH     r2,[r1,#0]
;;;31       PWM_InitStruct.PWM_WorkMode = PWM_WorkMode_Complementary;	//PWM0工作模式为独立模式
00002e  2020              MOVS     r0,#0x20
;;;32       
;;;33       PWM_Init(PWM0,&PWM_InitStruct);	//配置PWM0
000030  4d10              LDR      r5,|L1.116|
000032  8088              STRH     r0,[r1,#4]            ;31
000034  4628              MOV      r0,r5
000036  f7fffffe          BL       PWM_Init
;;;34       
;;;35       PWM_SetDuty(PWM0,PWM_Channel_0,PWM_InitStruct.PWM_Cycle / 2);	//配置占空比为50%
00003a  4669              MOV      r1,sp
00003c  88c8              LDRH     r0,[r1,#6]
00003e  2101              MOVS     r1,#1
000040  0842              LSRS     r2,r0,#1
000042  4628              MOV      r0,r5
000044  f7fffffe          BL       PWM_SetDuty
;;;36       
;;;37       PWM_RisingDeadTimeConfig(PWM0,15);	//PWM
000048  210f              MOVS     r1,#0xf
00004a  4628              MOV      r0,r5
00004c  f7fffffe          BL       PWM_RisingDeadTimeConfig
;;;38       PWM_FallingDeadTimeConfig(PWM0,15);
000050  210f              MOVS     r1,#0xf
000052  4628              MOV      r0,r5
000054  f7fffffe          BL       PWM_FallingDeadTimeConfig
;;;39       
;;;40       /* 使能PWM0中断 */
;;;41       PWM_ITConfig(PWM0,PWM_IT_INTEN,ENABLE);
000058  2201              MOVS     r2,#1
00005a  4621              MOV      r1,r4
00005c  4628              MOV      r0,r5
00005e  f7fffffe          BL       PWM_ITConfig
000062  4905              LDR      r1,|L1.120|
000064  0360              LSLS     r0,r4,#13
000066  6008              STR      r0,[r1,#0]
;;;42       NVIC_EnableIRQ(PWM0_IRQn);
;;;43       
;;;44       /* PWM外设初始化 */
;;;45       PWM_Cmd(PWM0,ENABLE);
000068  2101              MOVS     r1,#1
00006a  4628              MOV      r0,r5
00006c  f7fffffe          BL       PWM_Cmd
                  |L1.112|
;;;46       
;;;47       while(1);
000070  e7fe              B        |L1.112|
;;;48     }
;;;49     
                          ENDP

000072  0000              DCW      0x0000
                  |L1.116|
                          DCD      0x40020200
                  |L1.120|
                          DCD      0xe000e100

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

                  PWM_Complementary_PWMHandler PROC
;;;49     
;;;50     void PWM_Complementary_PWMHandler(void)
000000  b510              PUSH     {r4,lr}
;;;51     {
;;;52       /* 判断PWM0中断是否置起 */
;;;53       if(PWM_GetFlagStatus(PWM0,PWM_Flag_PWMIF) == SET)
000002  4c06              LDR      r4,|L2.28|
000004  2101              MOVS     r1,#1
000006  4620              MOV      r0,r4
000008  f7fffffe          BL       PWM_GetFlagStatus
00000c  2801              CMP      r0,#1
00000e  d103              BNE      |L2.24|
;;;54       {
;;;55         PWM_ClearFlag(PWM0,PWM_Flag_PWMIF);	//清除PWM0中断
000010  2101              MOVS     r1,#1
000012  4620              MOV      r0,r4
000014  f7fffffe          BL       PWM_ClearFlag
                  |L2.24|
;;;56       }
;;;57     }
000018  bd10              POP      {r4,pc}
;;;58     #endif
                          ENDP

00001a  0000              DCW      0x0000
                  |L2.28|
                          DCD      0x40020200

;*** Start embedded assembler ***

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

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

 revsh r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***
