bsp_timbase.txt 6.42 KB
; generated by Component: ARM Compiler 5.06 update 6 (build 750) Tool: ArmCC [4d3637]
; commandline ArmCC [--c99 --list --split_sections --debug -c --asm --interleave -o.\flash\obj\bsp_timbase.o --asm_dir=.\Flash\List\ --list_dir=.\Flash\List\ --depend=.\flash\obj\bsp_timbase.d --cpu=Cortex-M4.fp --apcs=interwork -O1 --diag_suppress=9931,870 -I..\..\Libraries\CMSIS\Include -I..\..\Libraries\CMSIS\Device\ST\STM32F4xx\Include -I..\..\Libraries\STM32F4xx_StdPeriph_Driver\inc -I..\..\uCOS-III\uC-CPU -I..\..\uCOS-III\uC-LIB -I..\..\uCOS-III\uCOS-III\Ports -I..\..\uCOS-III\uCOS-III\Source -I..\..\uCOS-III\uC-CPU\ARM-Cortex-M4\RealView -I..\..\uCOS-III\uC-LIB\Ports\ARM-Cortex-M4\RealView -I..\..\uCOS-III\uCOS-III\Ports\ARM-Cortex-M4\Generic\RealView -I..\..\User -I..\..\User\bsp -I..\..\User\bsp\inc -I..\..\User\libapp -I..\..\RL-ARM\Config -I..\..\RL-ARM\Driver -I..\..\RL-ARM\RL-RTX\inc -I..\..\User\bsp\BSP -I..\..\RL-ARM\RL-CAN -I..\..\Libraries\DSP_LIB\Include -I..\..\MODBUS\modbus\rtu -I..\..\MODBUS\BARE\port -I..\..\MODBUS\modbus\include -I..\..\User\bsp\BSP -I..\..\PLC -I..\..\Avoid -I..\..\User\parameter -I..\..\User\LaserMotionCtr -I..\..\User\W5100S -I..\..\User\bsp -I..\..\User\CHASSIS -I..\..\User\CONTROLFUNCTION -I..\..\User\DATAUPDATE -I..\..\User\HARAWARE -I..\..\User\MOTORDRIVER -I..\..\User\NAVAGATION -I..\..\User\PLATFORM -I..\..\User\SENSOR -I.\RTE\_Flash -IC:\Users\YDJ\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include -IC:\Users\YDJ\AppData\Local\Arm\Packs\Keil\STM32F4xx_DFP\2.13.0\Drivers\CMSIS\Device\ST\STM32F4xx\Include -D__UVISION_VERSION=527 -D_RTE_ -DSTM32F407xx -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -D__RTX -D__FPU_USED=1 --omf_browse=.\flash\obj\bsp_timbase.crf ..\..\User\bsp\BSP\bsp_TiMbase.c]
                          THUMB

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

                  TIM2_Configuration PROC
;;;35      */
;;;36     void TIM2_Configuration(void)
000000  b53e              PUSH     {r1-r5,lr}
;;;37     {
;;;38       TIM_TimeBaseInitTypeDef  TIM_TimeBaseStructure;
;;;39         
;;;40       /* 设置TIM2CLK 为 72MHZ */
;;;41       RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2 , ENABLE);
000002  2101              MOVS     r1,#1
000004  4608              MOV      r0,r1
000006  f7fffffe          BL       RCC_APB1PeriphClockCmd
;;;42       //TIM_DeInit(TIM2);
;;;43       
;;;44       /* 自动重装载寄存器周期的值(计数值) */
;;;45       TIM_TimeBaseStructure.TIM_Period=1000;
00000a  f44f707a          MOV      r0,#0x3e8
00000e  9001              STR      r0,[sp,#4]
;;;46     
;;;47       /* 累计 TIM_Period个频率后产生一个更新或者中断 */
;;;48       /* 时钟预分频数为72 */
;;;49       TIM_TimeBaseStructure.TIM_Prescaler= 71;
000010  2047              MOVS     r0,#0x47
000012  f8ad0000          STRH     r0,[sp,#0]
;;;50       
;;;51       /* 对外部时钟进行采样的时钟分频,这里没有用到 */
;;;52       TIM_TimeBaseStructure.TIM_ClockDivision=TIM_CKD_DIV1;
000016  2000              MOVS     r0,#0
000018  f8ad0008          STRH     r0,[sp,#8]
;;;53     
;;;54       TIM_TimeBaseStructure.TIM_CounterMode=TIM_CounterMode_Up; 
00001c  f8ad0002          STRH     r0,[sp,#2]
;;;55       TIM_TimeBaseInit(TIM2, &TIM_TimeBaseStructure);
000020  f04f4480          MOV      r4,#0x40000000
000024  4669              MOV      r1,sp
000026  4620              MOV      r0,r4
000028  f7fffffe          BL       TIM_TimeBaseInit
;;;56     
;;;57       TIM_ClearFlag(TIM2, TIM_FLAG_Update);
00002c  2101              MOVS     r1,#1
00002e  4620              MOV      r0,r4
000030  f7fffffe          BL       TIM_ClearFlag
;;;58     
;;;59       TIM_ITConfig(TIM2,TIM_IT_Update,ENABLE);
000034  2201              MOVS     r2,#1
000036  4611              MOV      r1,r2
000038  4620              MOV      r0,r4
00003a  f7fffffe          BL       TIM_ITConfig
;;;60     
;;;61       TIM_Cmd(TIM2, ENABLE);                                    
00003e  2101              MOVS     r1,#1
000040  4620              MOV      r0,r4
000042  f7fffffe          BL       TIM_Cmd
;;;62     
;;;63       RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2 , DISABLE);    /*先关闭等待使用*/    
000046  2100              MOVS     r1,#0
000048  2001              MOVS     r0,#1
00004a  f7fffffe          BL       RCC_APB1PeriphClockCmd
;;;64     }
00004e  bd3e              POP      {r1-r5,pc}
;;;65     /*********************************************END OF FILE**********************/
                          ENDP


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

                  TIM2_NVIC_Configuration PROC
;;;17     /* TIM2中断优先级配置 */
;;;18     void TIM2_NVIC_Configuration(void)
000000  b508              PUSH     {r3,lr}
;;;19     {
;;;20       NVIC_InitTypeDef NVIC_InitStructure; 
;;;21       
;;;22       NVIC_PriorityGroupConfig(NVIC_PriorityGroup_0);                            
000002  f44f60e0          MOV      r0,#0x700
000006  f7fffffe          BL       NVIC_PriorityGroupConfig
;;;23       NVIC_InitStructure.NVIC_IRQChannel = TIM2_IRQn;    
00000a  201c              MOVS     r0,#0x1c
00000c  f88d0000          STRB     r0,[sp,#0]
;;;24       NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
000010  2000              MOVS     r0,#0
000012  f88d0001          STRB     r0,[sp,#1]
;;;25       NVIC_InitStructure.NVIC_IRQChannelSubPriority = 3;  
000016  2003              MOVS     r0,#3
000018  f88d0002          STRB     r0,[sp,#2]
;;;26       NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
00001c  2001              MOVS     r0,#1
00001e  f88d0003          STRB     r0,[sp,#3]
;;;27       NVIC_Init(&NVIC_InitStructure);
000022  4668              MOV      r0,sp
000024  f7fffffe          BL       NVIC_Init
;;;28     }
000028  bd08              POP      {r3,pc}
;;;29     
                          ENDP


;*** Start embedded assembler ***

#line 1 "..\\..\\User\\bsp\\BSP\\bsp_TiMbase.c"
	AREA ||.rev16_text||, CODE
	THUMB
	EXPORT |__asm___13_bsp_TiMbase_c_6d0763c3____REV16|
#line 129 "..\\..\\Libraries\\CMSIS\\Include\\core_cmInstr.h"
|__asm___13_bsp_TiMbase_c_6d0763c3____REV16| PROC
#line 130

 rev16 r0, r0
 bx lr
	ENDP
	AREA ||.revsh_text||, CODE
	THUMB
	EXPORT |__asm___13_bsp_TiMbase_c_6d0763c3____REVSH|
#line 144
|__asm___13_bsp_TiMbase_c_6d0763c3____REVSH| PROC
#line 145

 revsh r0, r0
 bx lr
	ENDP
	AREA ||.rrx_text||, CODE
	THUMB
	EXPORT |__asm___13_bsp_TiMbase_c_6d0763c3____RRX|
#line 300
|__asm___13_bsp_TiMbase_c_6d0763c3____RRX| PROC
#line 301

 rrx r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***