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

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

                  TIM_PWMOutput_Function PROC
;;;12     
;;;13     void TIM_PWMOutput_Function(void)
000000  b51f              PUSH     {r0-r4,lr}
;;;14     {
;;;15       TIM_TimeBaseInitTypeDef TIM_TimeBaseInitStruct;
;;;16       TIM_PWM_InitTypeDef TIM_PWM_InitStruct;
;;;17       /* 使能TIM0时钟 */
;;;18       RCC_APB0Cmd(ENABLE);
000002  2001              MOVS     r0,#1
000004  f7fffffe          BL       RCC_APB0Cmd
;;;19       RCC_APB0PeriphClockCmd(RCC_APB0Periph_TIM0, ENABLE);
000008  2101              MOVS     r1,#1
00000a  4608              MOV      r0,r1
00000c  f7fffffe          BL       RCC_APB0PeriphClockCmd
;;;20       
;;;21       /* TIM配置结构体初始化 */
;;;22       TIM_TimeBaseStructInit(&TIM_TimeBaseInitStruct);
000010  4668              MOV      r0,sp
000012  f7fffffe          BL       TIM_TimeBaseStructInit
;;;23       TIM_PWMStructInit(&TIM_PWM_InitStruct);
000016  a803              ADD      r0,sp,#0xc
000018  f7fffffe          BL       TIM_PWMStructInit
;;;24       
;;;25       /* 设置TIM时基配置结构体 */
;;;26       TIM_TimeBaseInitStruct.TIM_CounterMode = TIM_CounterMode_Up;	//TIM工作在向上计数模式
00001c  2000              MOVS     r0,#0
00001e  466a              MOV      r2,sp
000020  8090              STRH     r0,[r2,#4]
;;;27       TIM_TimeBaseInitStruct.TIM_EXENX = TIM_EXENX_Disable;	//外部重加载管脚失能
;;;28     #if defined(SC32f10xx)||defined(SC32f12xx)
;;;29       TIM_TimeBaseInitStruct.TIM_Preload = (32000000 / 1000);	//设置TIM的定时器评论为1000Hz@APB0Clock=32M
000022  217d              MOVS     r1,#0x7d
000024  80d0              STRH     r0,[r2,#6]            ;27
000026  0209              LSLS     r1,r1,#8
000028  8111              STRH     r1,[r2,#8]
;;;30     #endif
;;;31       TIM_TimeBaseInitStruct.TIM_Prescaler = TIM_PRESCALER_1;	//TIM分频为1分频
00002a  8010              STRH     r0,[r2,#0]
;;;32       TIM_TimeBaseInitStruct.TIM_WorkMode = TIM_WorkMode_Timer;	//TIM工作在定时器模式，时钟源为APB0时钟
;;;33       
;;;34       /* TIM时基配置 */
;;;35       TIM_TIMBaseInit(TIM0, &TIM_TimeBaseInitStruct);
00002c  4c0c              LDR      r4,|L1.96|
00002e  8050              STRH     r0,[r2,#2]            ;32
000030  4669              MOV      r1,sp
000032  4620              MOV      r0,r4
000034  f7fffffe          BL       TIM_TIMBaseInit
;;;36       
;;;37       /* 设置TIM PWM配置结构体 */
;;;38       TIM_PWM_InitStruct.TIM_PWMOutputChannl = TIM_PWMChannel_PWMB;	//TIM0 PWMB输出使能
000038  2001              MOVS     r0,#1
00003a  466a              MOV      r2,sp
00003c  8190              STRH     r0,[r2,#0xc]
;;;39       
;;;40       /* TIM PWM配置 */
;;;41       TIM_PWMInit(TIM0,&TIM_PWM_InitStruct);
00003e  a903              ADD      r1,sp,#0xc
000040  4620              MOV      r0,r4
000042  f7fffffe          BL       TIM_PWMInit
;;;42     
;;;43       TIM_PWMSetDuty(TIM0,TIM_PWMChannel_PWMB,TIM_TimeBaseInitStruct.TIM_Preload/2);//占空比设置为50%
000046  466a              MOV      r2,sp
000048  8910              LDRH     r0,[r2,#8]
00004a  2101              MOVS     r1,#1
00004c  0842              LSRS     r2,r0,#1
00004e  4620              MOV      r0,r4
000050  f7fffffe          BL       TIM_PWMSetDuty
;;;44       
;;;45       /* TIM外设初始化 */
;;;46       TIM_Cmd(TIM0, ENABLE);
000054  2101              MOVS     r1,#1
000056  4620              MOV      r0,r4
000058  f7fffffe          BL       TIM_Cmd
                  |L1.92|
;;;47       while(1)
00005c  e7fe              B        |L1.92|
;;;48       {
;;;49       }
;;;50     }
                          ENDP

00005e  0000              DCW      0x0000
                  |L1.96|
                          DCD      0x40020100

;*** Start embedded assembler ***

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

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

 revsh r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***
