cansensor.txt 12.1 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\cansensor.o --asm_dir=.\Flash\List\ --list_dir=.\Flash\List\ --depend=.\flash\obj\cansensor.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\cansensor.crf ..\..\User\HARAWARE\CanSensor.c]
                          THUMB

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

                  Music_Select PROC
;;;5      u8 MusicSet[] = {0x23,0x00,0x01,0x00,0x00,0x00,0x00,0x00};
;;;6      u8 Music_Select(u8 MusicS,u8 Vol)
000000  4805              LDR      r0,|L1.24|
;;;7      {
;;;8      	static int LastTime = 0;
;;;9      	if(agv.Public.SystemTime - LastTime > 500)
000002  4906              LDR      r1,|L1.28|
000004  f8d000bc          LDR      r0,[r0,#0xbc]  ; agv
000008  680a              LDR      r2,[r1,#0]  ; LastTime
00000a  1a82              SUBS     r2,r0,r2
00000c  f5b27ffa          CMP      r2,#0x1f4
000010  d900              BLS      |L1.20|
;;;10     	{
;;;11     		LastTime = agv.Public.SystemTime;
000012  6008              STR      r0,[r1,#0]  ; LastTime
                  |L1.20|
;;;12     //		if(agv.Command.Music_ONOFF)//屏幕输入参数,控制音乐开关
;;;13     //		{
;;;14     //			MusicSet[5] = MusicS;
;;;15     //			MusicSet[6] = Vol;
;;;16     //			CAN2_Send_Msg(MusicSet, 8, 0x60A);//给音乐模块发送指令
;;;17     //			return 1;
;;;18     //		}
;;;19     //		else
;;;20     //		{	
;;;21     //			MusicSet[5] = MusicS;
;;;22     //			MusicSet[6] = 0;
;;;23     //			CAN2_Send_Msg(MusicSet, 8, 0x60A);//给音乐模块发送指令
;;;24     //			return 1;
;;;25     //		}
;;;26     	}
;;;27     	return 0;
000014  2000              MOVS     r0,#0
;;;28     }
000016  4770              BX       lr
;;;29     #elif P_SETUP_MUSIC_TYPE == 2
                          ENDP

                  |L1.24|
                          DCD      agv
                  |L1.28|
                          DCD      ||area_number.8||

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

                  ReceiveBatteryData PROC
;;;85     
;;;86     void ReceiveBatteryData(CanRxMsg *CanRxMsg)//接收电池数据
000000  b530              PUSH     {r4,r5,lr}
;;;87     {
;;;88     	if(CanRxMsg->StdId == BattaryBackID_1)//0X53C电池反馈的第一帧数据
000002  6801              LDR      r1,[r0,#0]
000004  f5a162a0          SUB      r2,r1,#0x500
000008  3a3c              SUBS     r2,r2,#0x3c
00000a  d142              BNE      |L2.146|
;;;89     	{
;;;90     		if(CanRxMsg->Data[0] == 0x03)
00000c  7ac1              LDRB     r1,[r0,#0xb]
00000e  2903              CMP      r1,#3
000010  d13f              BNE      |L2.146|
;;;91     		{
;;;92     			if ((CanRxMsg->Data[1] & 0x80) == 0x80)  //放电   bit7=1
000012  7b01              LDRB     r1,[r0,#0xc]
;;;93     			{
;;;94     				CanBatteryStruct.Current_out_int = 0;
000014  4b21              LDR      r3,|L2.156|
000016  060c              LSLS     r4,r1,#24             ;92
;;;95     				CanRxMsg->Data[1] &= 0x7f;
;;;96     			}
;;;97     			else {
;;;98     				CanBatteryStruct.Current_out_int = 1;  //电池充电
000018  f04f0101          MOV      r1,#1
00001c  d506              BPL      |L2.44|
00001e  f8832024          STRB     r2,[r3,#0x24]         ;94
000022  7b04              LDRB     r4,[r0,#0xc]          ;95
000024  f004047f          AND      r4,r4,#0x7f           ;95
000028  7304              STRB     r4,[r0,#0xc]          ;95
00002a  e001              B        |L2.48|
                  |L2.44|
00002c  f8831024          STRB     r1,[r3,#0x24]
                  |L2.48|
;;;99     			}
;;;100    			CanBatteryStruct.TotalCurrent = (CanRxMsg->Data[1] << 8) | CanRxMsg->Data[2];//总电流
000030  7b44              LDRB     r4,[r0,#0xd]
000032  7b05              LDRB     r5,[r0,#0xc]
000034  ea442405          ORR      r4,r4,r5,LSL #8
000038  621c              STR      r4,[r3,#0x20]  ; CanBatteryStruct
;;;101    			CanBatteryStruct.SOC = (CanRxMsg->Data[3] << 8) | CanRxMsg->Data[4];//SOC   满电500
00003a  7bc4              LDRB     r4,[r0,#0xf]
00003c  7b85              LDRB     r5,[r0,#0xe]
00003e  ea442405          ORR      r4,r4,r5,LSL #8
000042  629c              STR      r4,[r3,#0x28]  ; CanBatteryStruct
;;;102    			CanBatteryStruct.TotalVoltage = (CanRxMsg->Data[5] << 8) | CanRxMsg->Data[6];//总电压	
000044  7c44              LDRB     r4,[r0,#0x11]
000046  7c05              LDRB     r5,[r0,#0x10]
000048  ea442405          ORR      r4,r4,r5,LSL #8
00004c  62dc              STR      r4,[r3,#0x2c]  ; CanBatteryStruct
;;;103    			CanBatteryStruct.StateTable = CanRxMsg->Data[7];//信息状态
00004e  7c80              LDRB     r0,[r0,#0x12]
000050  6318              STR      r0,[r3,#0x30]  ; CanBatteryStruct
;;;104    			
;;;105    			if (CanBatteryStruct.StateTable & 0x01) //充电故障
000052  07c4              LSLS     r4,r0,#31
000054  d002              BEQ      |L2.92|
;;;106    			{
;;;107    				CanBatteryStruct.StateTable0 = 1;
000056  f8831034          STRB     r1,[r3,#0x34]
00005a  e001              B        |L2.96|
                  |L2.92|
;;;108    			}
;;;109    			else 
;;;110    			{
;;;111    				CanBatteryStruct.StateTable0 = 0;
00005c  f8832034          STRB     r2,[r3,#0x34]
                  |L2.96|
;;;112    			}
;;;113    			if (CanBatteryStruct.StateTable & 0x02) //放电过流
000060  0784              LSLS     r4,r0,#30
000062  d502              BPL      |L2.106|
;;;114    			{
;;;115    				CanBatteryStruct.StateTable1 = 1;
000064  f8831035          STRB     r1,[r3,#0x35]
000068  e001              B        |L2.110|
                  |L2.106|
;;;116    			}
;;;117    			else
;;;118    			{
;;;119    				CanBatteryStruct.StateTable1 = 0;
00006a  f8832035          STRB     r2,[r3,#0x35]
                  |L2.110|
;;;120    			}
;;;121    			if (CanBatteryStruct.StateTable & 0x04) //充电接触器闭合
00006e  0744              LSLS     r4,r0,#29
000070  d502              BPL      |L2.120|
;;;122    			{
;;;123    				CanBatteryStruct.StateTable2 = 1;
000072  f8831036          STRB     r1,[r3,#0x36]
000076  e001              B        |L2.124|
                  |L2.120|
;;;124    			}
;;;125    			else 
;;;126    			{
;;;127    				CanBatteryStruct.StateTable2 = 0;  //断开
000078  f8832036          STRB     r2,[r3,#0x36]
                  |L2.124|
;;;128    			}
;;;129    			if (CanBatteryStruct.StateTable & 0x08) //电池容量标志位2
00007c  0704              LSLS     r4,r0,#28
00007e  d502              BPL      |L2.134|
;;;130    			{
;;;131    				CanBatteryStruct.StateTable3 = 1;
000080  f8831037          STRB     r1,[r3,#0x37]
000084  e001              B        |L2.138|
                  |L2.134|
;;;132    			}
;;;133    			else 
;;;134    			{
;;;135    				CanBatteryStruct.StateTable3 = 0;
000086  f8832037          STRB     r2,[r3,#0x37]
                  |L2.138|
;;;136    			}
;;;137    			if (CanBatteryStruct.StateTable & 0x10)  //电池容量标志位1
00008a  06c0              LSLS     r0,r0,#27
00008c  d502              BPL      |L2.148|
;;;138    			{
;;;139    				CanBatteryStruct.StateTable4 = 1;
00008e  f8831038          STRB     r1,[r3,#0x38]
                  |L2.146|
;;;140    			}
;;;141    			else {
;;;142    				CanBatteryStruct.StateTable4 = 0;
;;;143    			}
;;;144    		}
;;;145    	}
;;;146    	else if(CanRxMsg->StdId == BattaryBackID_2)
;;;147    	{
;;;148    	
;;;149    	}
;;;150    }
000092  bd30              POP      {r4,r5,pc}
                  |L2.148|
000094  f8832038          STRB     r2,[r3,#0x38]         ;142
000098  bd30              POP      {r4,r5,pc}
;;;151    
                          ENDP

00009a  0000              DCW      0x0000
                  |L2.156|
                          DCD      ||.bss||

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

                  SendBatteryData PROC
;;;73     u8 BatteryData[] = {0x00,0x55,0xFF,0x5A,0x00,0x00,0x00,0x00};//下发给电池指令,超过120S不发,电池会报异常
;;;74     u8 SendBatteryData(void)
000000  b508              PUSH     {r3,lr}
;;;75     {
;;;76     	static int LastTime = 0;
;;;77     	if(agv.Public.SystemTime - LastTime > 20)
000002  480a              LDR      r0,|L3.44|
000004  490a              LDR      r1,|L3.48|
000006  f8d000bc          LDR      r0,[r0,#0xbc]  ; agv
00000a  684a              LDR      r2,[r1,#4]  ; LastTime
00000c  1a82              SUBS     r2,r0,r2
00000e  2a14              CMP      r2,#0x14
000010  d90a              BLS      |L3.40|
;;;78     	{
;;;79     		LastTime = agv.Public.SystemTime;
000012  6048              STR      r0,[r1,#4]  ; LastTime
;;;80     		CAN_Send_Msg(BattaryID,BatteryData,8,0,2);
000014  2002              MOVS     r0,#2
000016  9000              STR      r0,[sp,#0]
000018  2300              MOVS     r3,#0
00001a  2208              MOVS     r2,#8
00001c  3108              ADDS     r1,r1,#8
00001e  203c              MOVS     r0,#0x3c
000020  f7fffffe          BL       CAN_Send_Msg
;;;81     		return 1;
000024  2001              MOVS     r0,#1
;;;82     	}
;;;83     	return 0;
;;;84     }
000026  bd08              POP      {r3,pc}
                  |L3.40|
000028  2000              MOVS     r0,#0                 ;83
00002a  bd08              POP      {r3,pc}
;;;85     
                          ENDP

                  |L3.44|
                          DCD      agv
                  |L3.48|
                          DCD      ||area_number.8||

                          AREA ||.bss||, DATA, NOINIT, ALIGN=2

                  CanBatteryStruct
                          %        80

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

                  MusicSet
000000  23000100          DCB      0x23,0x00,0x01,0x00
000004  00000000          DCB      0x00,0x00,0x00,0x00

                          AREA ||area_number.8||, DATA, ALIGN=2

                          EXPORTAS ||area_number.8||, ||.data||
                  LastTime
                          DCD      0x00000000
                  |symbol_number.16|
                          DCD      0x00000000
                  BatteryData
000008  0055ff5a          DCB      0x00,0x55,0xff,0x5a
00000c  00000000          DCB      0x00,0x00,0x00,0x00

;*** Start embedded assembler ***

#line 1 "..\\..\\User\\HARAWARE\\CanSensor.c"
	AREA ||.rev16_text||, CODE
	THUMB
	EXPORT |__asm___11_CanSensor_c_MusicSet____REV16|
#line 129 "..\\..\\Libraries\\CMSIS\\Include\\core_cmInstr.h"
|__asm___11_CanSensor_c_MusicSet____REV16| PROC
#line 130

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

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

 rrx r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***