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

📄 mc_bldc_motor.ls

📁 STM8S105 BLDC源代码
💻 LS
📖 第 1 页 / 共 2 页
字号:
1228  0062 b70c          	ld	L3_sBLDC_Var+12,a
1229                     ; 196 	sBLDC_Struct.pBLDC_Var->bRising_Delay = val;
1231  0064 b70d          	ld	L3_sBLDC_Var+13,a
1232                     ; 197 }
1235  0066 81            	ret	
1260                     ; 199 u8 BLDC_Get_Demag_Time(void)
1260                     ; 200 {
1261                     	switch	.text
1262  0067               _BLDC_Get_Demag_Time:
1266                     ; 201 	return sBLDC_Struct.pBLDC_Var->bDemag_Time;
1268  0067 b60e          	ld	a,L3_sBLDC_Var+14
1271  0069 81            	ret	
1307                     ; 204 void BLDC_Set_Demag_Time(u8 val)
1307                     ; 205 {
1308                     	switch	.text
1309  006a               _BLDC_Set_Demag_Time:
1313                     ; 206 	sBLDC_Struct.pBLDC_Var->bDemag_Time = val;
1315  006a b70e          	ld	L3_sBLDC_Var+14,a
1316                     ; 207 }
1319  006c 81            	ret	
1344                     ; 209 u16 	BLDC_Get_MinimumOffTime(void)
1344                     ; 210 {
1345                     	switch	.text
1346  006d               _BLDC_Get_MinimumOffTime:
1350                     ; 211 	return sBLDC_Struct.pBLDC_Var->hMinimumOffTime;
1352  006d be0f          	ldw	x,L3_sBLDC_Var+15
1355  006f 81            	ret	
1391                     ; 214 void 	BLDC_Set_MinimumOffTime(u16 val)
1391                     ; 215 {
1392                     	switch	.text
1393  0070               _BLDC_Set_MinimumOffTime:
1397                     ; 216 	sBLDC_Struct.pBLDC_Var->hMinimumOffTime = val;
1399  0070 bf0f          	ldw	L3_sBLDC_Var+15,x
1400                     ; 217 }
1403  0072 81            	ret	
1427                     ; 219 s16  BLDC_Get_Speed_KP(void)
1427                     ; 220 {
1428                     	switch	.text
1429  0073               _BLDC_Get_Speed_KP:
1433                     ; 222 		return sBLDC_Struct.pBLDC_Const->pPID_Speed->pPID_Var->hKp_Gain;
1435  0073 72ce001e      	ldw	x,[L31_sBLDC_Const+6.w]
1436  0077 fe            	ldw	x,(x)
1439  0078 81            	ret	
1474                     ; 228 void  BLDC_Set_Speed_KP(s16 val)
1474                     ; 229 {
1475                     	switch	.text
1476  0079               _BLDC_Set_Speed_KP:
1480                     ; 230 	sBLDC_Struct.pBLDC_Const->pPID_Speed->pPID_Var->hKp_Gain = val;
1482  0079 5172ce001e51  	ldw	y,[L31_sBLDC_Const+6.w]
1483  007f 90ff          	ldw	(y),x
1484                     ; 231 }
1487  0081 81            	ret	
1511                     ; 233 s16  BLDC_Get_Speed_KI(void)
1511                     ; 234 {
1512                     	switch	.text
1513  0082               _BLDC_Get_Speed_KI:
1517                     ; 236 		return sBLDC_Struct.pBLDC_Const->pPID_Speed->pPID_Var->hKi_Gain;
1519  0082 72ce001e      	ldw	x,[L31_sBLDC_Const+6.w]
1520  0086 ee02          	ldw	x,(2,x)
1523  0088 81            	ret	
1558                     ; 242 void  BLDC_Set_Speed_KI(s16 val)
1558                     ; 243 {
1559                     	switch	.text
1560  0089               _BLDC_Set_Speed_KI:
1564                     ; 244 	sBLDC_Struct.pBLDC_Const->pPID_Speed->pPID_Var->hKi_Gain = val;
1566  0089 5172ce001e51  	ldw	y,[L31_sBLDC_Const+6.w]
1567  008f 90ef02        	ldw	(2,y),x
1568                     ; 245 }
1571  0092 81            	ret	
1595                     ; 247 s16  BLDC_Get_Speed_KD(void)
1595                     ; 248 {
1596                     	switch	.text
1597  0093               _BLDC_Get_Speed_KD:
1601                     ; 250 		return sBLDC_Struct.pBLDC_Const->pPID_Speed->pPID_Var->hKd_Gain;
1603  0093 72ce001e      	ldw	x,[L31_sBLDC_Const+6.w]
1604  0097 ee04          	ldw	x,(4,x)
1607  0099 81            	ret	
1642                     ; 256 void  BLDC_Set_Speed_KD(s16 val)
1642                     ; 257 {
1643                     	switch	.text
1644  009a               _BLDC_Set_Speed_KD:
1648                     ; 258 	sBLDC_Struct.pBLDC_Const->pPID_Speed->pPID_Var->hKd_Gain = val;
1650  009a 5172ce001e51  	ldw	y,[L31_sBLDC_Const+6.w]
1651  00a0 90ef04        	ldw	(4,y),x
1652                     ; 259 }
1655  00a3 81            	ret	
1680                     ; 261 s16 BLDC_Get_Bus_Voltage(void)
1680                     ; 262 {
1681                     	switch	.text
1682  00a4               _BLDC_Get_Bus_Voltage:
1686                     ; 263         return (s16)(sBLDC_Struct.pBLDC_Var->hBusVoltage);
1688  00a4 be11          	ldw	x,L3_sBLDC_Var+17
1691  00a6 81            	ret	
1727                     ; 266 void  BLDC_Set_Bus_Voltage(s16 BusVoltage)
1727                     ; 267 {
1728                     	switch	.text
1729  00a7               _BLDC_Set_Bus_Voltage:
1733                     ; 268 	sBLDC_Struct.pBLDC_Var->hBusVoltage = BusVoltage;
1735  00a7 bf11          	ldw	L3_sBLDC_Var+17,x
1736                     ; 269 }
1739  00a9 81            	ret	
1764                     ; 271 u8 BLDC_Get_Heatsink_Temperature(void)
1764                     ; 272 {
1765                     	switch	.text
1766  00aa               _BLDC_Get_Heatsink_Temperature:
1770                     ; 273 	return (u8)(sBLDC_Struct.pBLDC_Var->bHeatsinkTemp);
1772  00aa b613          	ld	a,L3_sBLDC_Var+19
1775  00ac 81            	ret	
1811                     ; 276 void BLDC_Set_Heatsink_Temperature(u8 temp)
1811                     ; 277 {
1812                     	switch	.text
1813  00ad               _BLDC_Set_Heatsink_Temperature:
1817                     ; 278 	sBLDC_Struct.pBLDC_Var->bHeatsinkTemp = temp;
1819  00ad b713          	ld	L3_sBLDC_Var+19,a
1820                     ; 279 }
1823  00af 81            	ret	
1847                     ; 281 u8 BLDC_Get_FastDemag(void)
1847                     ; 282 {
1848                     	switch	.text
1849  00b0               _BLDC_Get_FastDemag:
1853                     ; 283 	return (u8)(sBLDC_Struct.pBLDC_Var->bFastDemag);
1855  00b0 b614          	ld	a,L3_sBLDC_Var+20
1858  00b2 81            	ret	
1893                     ; 286 void BLDC_Set_FastDemag(u8 temp)
1893                     ; 287 {
1894                     	switch	.text
1895  00b3               _BLDC_Set_FastDemag:
1899                     ; 291 		sBLDC_Struct.pBLDC_Var->bFastDemag = 0;
1901  00b3 3f14          	clr	L3_sBLDC_Var+20
1902                     ; 293 }
1905  00b5 81            	ret	
1930                     ; 295 u8 BLDC_Get_ToggleMode(void)
1930                     ; 296 {
1931                     	switch	.text
1932  00b6               _BLDC_Get_ToggleMode:
1936                     ; 297 	return (u8)(sBLDC_Struct.pBLDC_Var->bToggleMode);
1938  00b6 b615          	ld	a,L3_sBLDC_Var+21
1941  00b8 81            	ret	
1977                     ; 300 void BLDC_Set_ToggleMode(u8 temp)
1977                     ; 301 {
1978                     	switch	.text
1979  00b9               _BLDC_Set_ToggleMode:
1983                     ; 302 	sBLDC_Struct.pBLDC_Var->bToggleMode = temp;
1985  00b9 b715          	ld	L3_sBLDC_Var+21,a
1986                     ; 303 }
1989  00bb 81            	ret	
2013                     ; 305 u8 BLDC_Get_AutoDelay(void)
2013                     ; 306 {
2014                     	switch	.text
2015  00bc               _BLDC_Get_AutoDelay:
2019                     ; 307 	return (u8)(sBLDC_Struct.pBLDC_Var->bAutoDelay);
2021  00bc b616          	ld	a,L3_sBLDC_Var+22
2024  00be 81            	ret	
2059                     ; 310 void BLDC_Set_AutoDelay(u8 temp)
2059                     ; 311 {
2060                     	switch	.text
2061  00bf               _BLDC_Set_AutoDelay:
2065                     ; 312 	sBLDC_Struct.pBLDC_Var->bAutoDelay = temp;
2067  00bf b716          	ld	L3_sBLDC_Var+22,a
2068                     ; 313 }
2071  00c1 81            	ret	
2167                     	xref	_PI_Regulator
2168                     	xdef	_BLDC_Set_AutoDelay
2169                     	xdef	_BLDC_Get_AutoDelay
2170                     	xdef	_BLDC_Set_ToggleMode
2171                     	xdef	_BLDC_Get_ToggleMode
2172                     	xdef	_BLDC_Set_FastDemag
2173                     	xdef	_BLDC_Get_FastDemag
2174                     	xdef	_BLDC_Set_Heatsink_Temperature
2175                     	xdef	_BLDC_Get_Heatsink_Temperature
2176                     	xdef	_BLDC_Set_Bus_Voltage
2177                     	xdef	_BLDC_Get_Bus_Voltage
2178                     	xdef	_BLDC_Set_Speed_KD
2179                     	xdef	_BLDC_Get_Speed_KD
2180                     	xdef	_BLDC_Set_Speed_KI
2181                     	xdef	_BLDC_Get_Speed_KI
2182                     	xdef	_BLDC_Set_Speed_KP
2183                     	xdef	_BLDC_Get_Speed_KP
2184                     	xdef	_BLDC_Set_MinimumOffTime
2185                     	xdef	_BLDC_Get_MinimumOffTime
2186                     	xdef	_BLDC_Set_Demag_Time
2187                     	xdef	_BLDC_Get_Demag_Time
2188                     	xdef	_BLDC_Set_Rising_Delay
2189                     	xdef	_BLDC_Get_Rising_Delay
2190                     	xdef	_BLDC_Set_Falling_Delay
2191                     	xdef	_BLDC_Get_Falling_Delay
2192                     	xdef	_BLDC_Set_Current_measured
2193                     	xdef	_BLDC_Get_Current_measured
2194                     	xdef	_BLDC_Set_Current_reference
2195                     	xdef	_BLDC_Get_Current_reference
2196                     	xdef	_BLDC_Set_Duty_cycle_cnt
2197                     	xdef	_BLDC_Get_Duty_cycle_cnt
2198                     	xdef	_BLDC_Set_Duty_cycle
2199                     	xdef	_BLDC_Get_Duty_cycle
2200                     	xdef	_BLDC_Get_Measured_rotor_speed
2201                     	xdef	_BLDC_Set_Target_rotor_speed
2202                     	xdef	_BLDC_Get_Target_rotor_speed
2203                     	xdef	_Get_BLDC_Const
2204                     	xdef	_Get_BLDC_Var
2205                     	xdef	_Get_BLDC_Struct
2206                     	xref.b	c_lreg
2207                     	xref.b	c_x
2208                     	xref.b	c_y
2227                     	xref	c_imul
2228                     	xref	c_umul
2229                     	xref	c_ludv
2230                     	xref	c_cmulx
2231                     	end

⌨️ 快捷键说明

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