⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 it_st7mc.ls

📁 该程序是ST7MC驱动BLDC120
💻 LS
📖 第 1 页 / 共 2 页
字号:
 774  006e 2714          	jreq	L172
 775                     ; 329     	SCI_TxDelay_Timer--;
 777  0070 c60000        	ld	a,_SCI_TxDelay_Timer
 778  0073 4a            	dec	a
 779  0074 c70000        	ld	_SCI_TxDelay_Timer,a
 780                     ; 330 		if (SCI_TxDelay_Timer == 0) TimeBaseStatus |= SCI_TXDelay_ELAPSED;		   	
 782  0077 c60000        	ld	a,_SCI_TxDelay_Timer
 783  007a 2608          	jrne	L172
 786  007c c60005        	ld	a,_TimeBaseStatus
 787  007f aa01          	or	a,#1
 788  0081 c70005        	ld	_TimeBaseStatus,a
 789  0084               L172:
 790                     ; 333     if (Restart_Timer++ >= 3000)     				//by lf  05.7.31 18000-->3000
 792  0084 c60003        	ld	a,_Restart_Timer
 793  0087 b700          	ld	c_x,a
 794  0089 ce0004        	ld	x,_Restart_Timer+1
 795  008c c60004        	ld	a,_Restart_Timer+1
 796  008f ab01          	add	a,#1
 797  0091 c70004        	ld	_Restart_Timer+1,a
 798  0094 c60003        	ld	a,_Restart_Timer
 799  0097 a900          	adc	a,#0
 800  0099 c70003        	ld	_Restart_Timer,a
 801  009c 9f            	ld	a,x
 802  009d a0b8          	sub	a,#184
 803  009f b600          	ld	a,c_x
 804  00a1 a20b          	sbc	a,#11
 805  00a3 250f          	jrult	L572
 806                     ; 335  		Restart_Timer = 0;
 808  00a5 4f            	clr	a
 809  00a6 c70003        	ld	_Restart_Timer,a
 810  00a9 c70004        	ld	_Restart_Timer+1,a
 811                     ; 336  		TimeBaseStatus &= (u8)(~Restart_3Min_Begin);   	
 813  00ac c60005        	ld	a,_TimeBaseStatus
 814  00af a4fd          	and	a,#253
 815  00b1 c70005        	ld	_TimeBaseStatus,a
 816  00b4               L572:
 817                     ; 346 	if (timer_after_start != 0) timer_after_start--;
 819  00b4 c60002        	ld	a,_timer_after_start+1
 820  00b7 2603          	jrne	L05
 821  00b9 ce0001        	ld	x,_timer_after_start
 822  00bc               L05:
 823  00bc 2713          	jreq	L772
 826  00be ce0001        	ld	x,_timer_after_start
 827  00c1 c60002        	ld	a,_timer_after_start+1
 828  00c4 a001          	sub	a,#1
 829  00c6 88            	push	a
 830  00c7 9f            	ld	a,x
 831  00c8 a200          	sbc	a,#0
 832  00ca c70001        	ld	_timer_after_start,a
 833  00cd 84            	pop	a
 834  00ce c70002        	ld	_timer_after_start+1,a
 835  00d1               L772:
 836                     ; 347 	if (SpdVarPeriodCounter != 0) SpdVarPeriodCounter--;
 838  00d1 c60000        	ld	a,_SpdVarPeriodCounter
 839  00d4 2707          	jreq	L103
 842  00d6 c60000        	ld	a,_SpdVarPeriodCounter
 843  00d9 4a            	dec	a
 844  00da c70000        	ld	_SpdVarPeriodCounter,a
 845  00dd               L103:
 846                     ; 348 	if (DebounceButton != 0) DebounceButton--;
 848  00dd c60000        	ld	a,_DebounceButton
 849  00e0 2707          	jreq	L303
 852  00e2 c60000        	ld	a,_DebounceButton
 853  00e5 4a            	dec	a
 854  00e6 c70000        	ld	_DebounceButton,a
 855  00e9               L303:
 856                     ; 349 	if (timer_10ms != 0) timer_10ms--;
 858  00e9 c60000        	ld	a,_timer_10ms
 859  00ec 2707          	jreq	L503
 862  00ee c60000        	ld	a,_timer_10ms
 863  00f1 4a            	dec	a
 864  00f2 c70000        	ld	_timer_10ms,a
 865  00f5               L503:
 866                     ; 350 	if (timer_CL_10ms != 0) timer_CL_10ms--;	           
 868  00f5 c60000        	ld	a,_timer_CL_10ms
 869  00f8 2603cc018c    	jreq	L113
 872  00fd c60000        	ld	a,_timer_CL_10ms
 873  0100 4a            	dec	a
 874  0101 c70000        	ld	_timer_CL_10ms,a
 875  0104 cc018c        	jra	L113
 876  0107               L562:
 877                     ; 354 	timer=TAOC2HR<<8;
 879  0107 be00          	ld	x,_TAOC2HR
 880  0109 4f            	clr	a
 881  010a 9096          	ld	y,s
 882  010c 90d70102      	ld	(OFST+0,y),a
 883  0110 9f            	ld	a,x
 884  0111 90d70101      	ld	(OFST-1,y),a
 885                     ; 355 	timer+=TAOC2LR;
 887  0115 96            	ld	x,s
 888  0116 b600          	ld	a,_TAOC2LR
 889  0118 db0102        	add	a,(OFST+0,x)
 890  011b d70102        	ld	(OFST+0,x),a
 891  011e d60101        	ld	a,(OFST-1,x)
 892  0121 a900          	adc	a,#0
 893  0123 d70101        	ld	(OFST-1,x),a
 894                     ; 356 	timer+= 1000;   // int every 1 ms
 896  0126 d60102        	ld	a,(OFST+0,x)
 897  0129 abe8          	add	a,#232
 898  012b d70102        	ld	(OFST+0,x),a
 899  012e d60101        	ld	a,(OFST-1,x)
 900  0131 a903          	adc	a,#3
 901  0133 d70101        	ld	(OFST-1,x),a
 902                     ; 357 	TAOC2HR=(u8)(timer>>8);
 904  0136 b700          	ld	_TAOC2HR,a
 905                     ; 358 	TAOC2LR=(u8)timer;
 907  0138 d60102        	ld	a,(OFST+0,x)
 908  013b b700          	ld	_TAOC2LR,a
 909                     ; 360 	if (Timer_1ms !=0) Timer_1ms--;
 911  013d c60001        	ld	a,_Timer_1ms+1
 912  0140 2603          	jrne	L25
 913  0142 ce0000        	ld	x,_Timer_1ms
 914  0145               L25:
 915  0145 2713          	jreq	L313
 918  0147 ce0000        	ld	x,_Timer_1ms
 919  014a c60001        	ld	a,_Timer_1ms+1
 920  014d a001          	sub	a,#1
 921  014f 88            	push	a
 922  0150 9f            	ld	a,x
 923  0151 a200          	sbc	a,#0
 924  0153 c70000        	ld	_Timer_1ms,a
 925  0156 84            	pop	a
 926  0157 c70001        	ld	_Timer_1ms+1,a
 927  015a               L313:
 928                     ; 361 	if (Timer_WDG !=0) Timer_WDG--;
 930  015a c60000        	ld	a,_Timer_WDG
 931  015d 2707          	jreq	L513
 934  015f c60000        	ld	a,_Timer_WDG
 935  0162 4a            	dec	a
 936  0163 c70000        	ld	_Timer_WDG,a
 937  0166               L513:
 938                     ; 362 	if (PI_Sampling != 0) PI_Sampling--;
 940  0166 c60000        	ld	a,_PI_Sampling
 941  0169 2706          	jreq	L713
 944  016b c60000        	ld	a,_PI_Sampling
 945  016e 4a            	dec	a
 947  016f 2018          	jp	LC001
 948  0171               L713:
 949                     ; 365 		SetBit(Flag_MTC,SAMP_EVT);
 951  0171 c60000        	ld	a,_Flag_MTC
 952  0174 aa02          	or	a,#2
 953  0176 c70000        	ld	_Flag_MTC,a
 954                     ; 366 		if (Get_CurrentTargetSpeed() <= (35*Pole_Pair_Num*10) ) PI_Sampling = SAMPLING_TIME_LowSpeed;		
 956  0179 cd0000        	call	_Get_CurrentTargetSpeed
 958  017c a0bd          	sub	a,#189
 959  017e 9f            	ld	a,x
 960  017f a202          	sbc	a,#2
 961  0181 2404          	jruge	L323
 964  0183 a614          	ld	a,#20
 966  0185 2002          	jp	LC001
 967  0187               L323:
 968                     ; 367 		else PI_Sampling = SAMPLING_TIME_HighSpeed;
 970  0187 a60a          	ld	a,#10
 971  0189               LC001:
 972  0189 c70000        	ld	_PI_Sampling,a
 973  018c               L113:
 974                     ; 371 }
 977  018c 84            	pop	a
 978  018d 84            	pop	a
 979  018e 84            	pop	a
 980  018f b700          	ld	c_y,a
 981  0191 84            	pop	a
 982  0192 b701          	ld	c_y+1,a
 983  0194 84            	pop	a
 984  0195 b700          	ld	c_x,a
 985  0197 84            	pop	a
 986  0198 b701          	ld	c_x+1,a
 987  019a 9085          	pop	y
 988  019c 80            	iret	
1010                     ; 390 void AVD_Interrupt(void)
1010                     ; 391 {
1011                     .text:	section	.text,new
1012  0000               _AVD_Interrupt:
1016                     ; 392 }
1019  0000 80            	iret	
1041                     ; 411 void ART_Interrupt(void)
1041                     ; 412 {
1042                     .text:	section	.text,new
1043  0000               _ART_Interrupt:
1047                     ; 413 }
1050  0000 80            	iret	
1119                     	xdef	_ART_Interrupt
1120                     	xdef	_AVD_Interrupt
1121                     	xdef	_TIMA_Interrupt
1122                     	xdef	_TIMB_Interrupt
1123                     	xdef	_SPI_Interrupt
1124                     	xdef	_PORTS_2_Interrupt
1125                     	xdef	_PORTS_1_Interrupt
1126                     	xdef	_PORTS_0_Interrupt
1127                     	xdef	_MCC_Interrupt
1128                     	xdef	_TRAP_Interrupt
1129                     	xdef	_dummy_rt
1130                     	xdef	_TimeBaseStatus
1131                     	switch	.bss
1132  0000               _SCI_TxDelay_Timer:
1133  0000 00            	ds.b	1
1134                     	xdef	_SCI_TxDelay_Timer
1135  0001               _SCIRX_Watchdog:
1136  0001 0000          	ds.b	2
1137                     	xdef	_SCIRX_Watchdog
1138                     	xdef	_SpdVarPeriodCounter
1139                     	xref	_Timer_WDG
1140                     	xref	_Flag_MTC
1141                     	xref	_Timer_1ms
1142                     	xref	_timer_CL_10ms
1143                     	xref	_PI_Sampling
1144                     	xref	_timer_10ms
1145                     	xref.b	_TAOC2LR
1146                     	xref.b	_TAOC2HR
1147                     	xref.b	_TAOC1LR
1148                     	xref.b	_TAOC1HR
1149                     	xref.b	_TASR
1150                     	xdef	_Set_RestartTimer
1151                     	xref	_Get_CurrentTargetSpeed
1152                     	xdef	_Timer_RestartTimerBegin
1153                     	xdef	_Resert_SCIRX_Watchdog
1154                     	xdef	_Timer_IsSCITXDelayElapsed
1155                     	xdef	_Timer_SetSCITXDelayPeriod
1156                     	xdef	_Timer_SpdVarPeriodElapsed
1157                     	xdef	_Timer_GetSpdVarPeriod
1158                     	xdef	_Timer_SetSpdVarPeriod
1159                     	xref.b	_MotorStatus
1160                     	xdef	_Restart_Timer
1161                     	xdef	_timer_after_start
1162                     	xref	_DebounceButton
1163                     	xref.b	c_x
1164                     	xref.b	c_y
1184                     	end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -