porttimer.txt 10 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\porttimer.o --asm_dir=.\Flash\List\ --list_dir=.\Flash\List\ --depend=.\flash\obj\porttimer.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\porttimer.crf ..\..\MODBUS\BARE\port\porttimer.c]
                          THUMB

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

                  TIM5_IRQHandler PROC
;;;103    //定时器2 中断函数
;;;104    void TIM5_IRQHandler(void)
000000  b510              PUSH     {r4,lr}
;;;105    {
;;;106        CPU_SR_ALLOC();
;;;107    
;;;108        CPU_CRITICAL_ENTER();
000002  f7fffffe          BL       CPU_SR_Save
000006  4604              MOV      r4,r0
;;;109        OSIntEnter();                                          
000008  f7fffffe          BL       OSIntEnter
;;;110        CPU_CRITICAL_EXIT();
00000c  4620              MOV      r0,r4
00000e  f7fffffe          BL       CPU_SR_Restore
;;;111    
;;;112    	if (TIM_GetITStatus(TIM5, TIM_IT_Update) != RESET)
000012  4c08              LDR      r4,|L1.52|
000014  2101              MOVS     r1,#1
000016  4620              MOV      r0,r4
000018  f7fffffe          BL       TIM_GetITStatus
00001c  b128              CBZ      r0,|L1.42|
;;;113    	{
;;;114    		TIM_ClearITPendingBit(TIM5, TIM_IT_Update);
00001e  2101              MOVS     r1,#1
000020  4620              MOV      r0,r4
000022  f7fffffe          BL       TIM_ClearITPendingBit
;;;115    		prvvTIMERExpiredISR();
000026  f7fffffe          BL       prvvTIMERExpiredISR
                  |L1.42|
;;;116    	}
;;;117        OSIntExit(); 
00002a  e8bd4010          POP      {r4,lr}
00002e  f7ffbffe          B.W      OSIntExit
;;;118    }
;;;119    
                          ENDP

000032  0000              DCW      0x0000
                  |L1.52|
                          DCD      0x40000c00

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

                  prvvTIMERExpiredISR PROC
;;;97      */
;;;98     void prvvTIMERExpiredISR( void )
000000  4801              LDR      r0,|L2.8|
;;;99     {
;;;100        ( void )pxMBPortCBTimerExpired(  );
000002  6800              LDR      r0,[r0,#0]  ; pxMBPortCBTimerExpired
000004  4700              BX       r0
;;;101    }
;;;102    
                          ENDP

000006  0000              DCW      0x0000
                  |L2.8|
                          DCD      pxMBPortCBTimerExpired

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

                  vMBPortTimersDisable PROC
;;;83     void
;;;84     vMBPortTimersDisable(  )
000000  b510              PUSH     {r4,lr}
;;;85     {
;;;86         /* Disable any pending timers. */
;;;87         TIM_SetCounter(TIM5, 0);
000002  4c06              LDR      r4,|L3.28|
000004  2100              MOVS     r1,#0
000006  4620              MOV      r0,r4
000008  f7fffffe          BL       TIM_SetCounter
;;;88     
;;;89         //TIM_Cmd(TIM2, DISABLE);
;;;90     
;;;91         TIM_ITConfig(TIM5, TIM_IT_Update, DISABLE);
00000c  4620              MOV      r0,r4
00000e  2200              MOVS     r2,#0
000010  e8bd4010          POP      {r4,lr}
000014  2101              MOVS     r1,#1
000016  f7ffbffe          B.W      TIM_ITConfig
;;;92     }
;;;93     
                          ENDP

00001a  0000              DCW      0x0000
                  |L3.28|
                          DCD      0x40000c00

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

                  vMBPortTimersEnable PROC
;;;70     void
;;;71     vMBPortTimersEnable(  )
000000  b510              PUSH     {r4,lr}
;;;72     {
;;;73         /* Enable the timer with the timeout passed to xMBPortTimersInit( ) */
;;;74         TIM_ClearITPendingBit(TIM5, TIM_IT_Update);
000002  4c08              LDR      r4,|L4.36|
000004  2101              MOVS     r1,#1
000006  4620              MOV      r0,r4
000008  f7fffffe          BL       TIM_ClearITPendingBit
;;;75     
;;;76         TIM_SetCounter(TIM5, 0);
00000c  2100              MOVS     r1,#0
00000e  4620              MOV      r0,r4
000010  f7fffffe          BL       TIM_SetCounter
;;;77     
;;;78         //TIM_Cmd(TIM2, ENABLE);
;;;79     
;;;80         TIM_ITConfig(TIM5, TIM_IT_Update, ENABLE);
000014  4620              MOV      r0,r4
000016  2201              MOVS     r2,#1
000018  e8bd4010          POP      {r4,lr}
00001c  4611              MOV      r1,r2
00001e  f7ffbffe          B.W      TIM_ITConfig
;;;81     }
;;;82     //失能定时器
                          ENDP

000022  0000              DCW      0x0000
                  |L4.36|
                          DCD      0x40000c00

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

                  xMBPortTimersInit PROC
;;;37     BOOL
;;;38     xMBPortTimersInit( USHORT usTim1Timerout50us )
000000  b57f              PUSH     {r0-r6,lr}
;;;39     {
;;;40         TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
;;;41     	NVIC_InitTypeDef        NVIC_InitStructure;
;;;42     	
;;;43     	RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM5, ENABLE);
000002  2101              MOVS     r1,#1
000004  2008              MOVS     r0,#8
000006  f7fffffe          BL       RCC_APB1PeriphClockCmd
;;;44         
;;;45     	TIM_TimeBaseStructure.TIM_Period = 20;
00000a  2014              MOVS     r0,#0x14
00000c  9002              STR      r0,[sp,#8]
;;;46         
;;;47         //50um计时一次
;;;48     	TIM_TimeBaseStructure.TIM_Prescaler = 2100 - 1;
00000e  f6400033          MOV      r0,#0x833
000012  f8ad0004          STRH     r0,[sp,#4]
;;;49     	TIM_TimeBaseStructure.TIM_ClockDivision = 0;
000016  2400              MOVS     r4,#0
000018  f8ad400c          STRH     r4,[sp,#0xc]
;;;50     	TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;
00001c  f8ad4006          STRH     r4,[sp,#6]
;;;51     	TIM_TimeBaseInit(TIM5, &TIM_TimeBaseStructure);
000020  4d13              LDR      r5,|L5.112|
000022  a901              ADD      r1,sp,#4
000024  4628              MOV      r0,r5
000026  f7fffffe          BL       TIM_TimeBaseInit
;;;52     
;;;53     	TIM_ARRPreloadConfig(TIM5, ENABLE);
00002a  2101              MOVS     r1,#1
00002c  4628              MOV      r0,r5
00002e  f7fffffe          BL       TIM_ARRPreloadConfig
;;;54     	
;;;55     
;;;56     	NVIC_InitStructure.NVIC_IRQChannel                   = TIM5_IRQn;
000032  2132              MOVS     r1,#0x32
000034  f88d1000          STRB     r1,[sp,#0]
;;;57     	NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 11;  //优先级要比串口低 
000038  210b              MOVS     r1,#0xb
00003a  f88d1001          STRB     r1,[sp,#1]
;;;58     	NVIC_InitStructure.NVIC_IRQChannelSubPriority        = 0;
00003e  f88d4002          STRB     r4,[sp,#2]
;;;59     	NVIC_InitStructure.NVIC_IRQChannelCmd                = ENABLE;
000042  2101              MOVS     r1,#1
000044  f88d1003          STRB     r1,[sp,#3]
;;;60     	NVIC_Init(&NVIC_InitStructure);
000048  4668              MOV      r0,sp
00004a  f7fffffe          BL       NVIC_Init
;;;61     	
;;;62     	TIM_ClearITPendingBit(TIM5, TIM_IT_Update);
00004e  2101              MOVS     r1,#1
000050  4628              MOV      r0,r5
000052  f7fffffe          BL       TIM_ClearITPendingBit
;;;63     	TIM_ITConfig(TIM5, TIM_IT_Update, DISABLE);
000056  2200              MOVS     r2,#0
000058  2101              MOVS     r1,#1
00005a  4628              MOV      r0,r5
00005c  f7fffffe          BL       TIM_ITConfig
;;;64     	TIM_Cmd(TIM5, ENABLE);
000060  2101              MOVS     r1,#1
000062  4628              MOV      r0,r5
000064  f7fffffe          BL       TIM_Cmd
;;;65     	
;;;66     	return TRUE;
;;;67     }
000068  b004              ADD      sp,sp,#0x10
00006a  2001              MOVS     r0,#1                 ;66
00006c  bd70              POP      {r4-r6,pc}
;;;68     
                          ENDP

00006e  0000              DCW      0x0000
                  |L5.112|
                          DCD      0x40000c00

;*** Start embedded assembler ***

#line 1 "..\\..\\MODBUS\\BARE\\port\\porttimer.c"
	AREA ||.rev16_text||, CODE
	THUMB
	EXPORT |__asm___11_porttimer_c_ebc59195____REV16|
#line 129 "..\\..\\Libraries\\CMSIS\\Include\\core_cmInstr.h"
|__asm___11_porttimer_c_ebc59195____REV16| PROC
#line 130

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

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

 rrx r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***