📄 com_trig.lst
字号:
dspa -q -l -s -i../../../rtmon -i../../../sys/bldc3_2/asm -i..\..\..\rtmon -i..\..\..\sys\bldc3_2\asm -v2xx -iC:/ti/c2400/cgtools/include -g com_trig.asm com_trig.obj
TMS320C24xx COFF Assembler Version 7.02 Sun Apr 27 20:39:39 2003
Copyright (c) 1987-2002 Texas Instruments Incorporated
com_trig.asm PAGE 1
1 ;====================================================================================
2 ; Module Name: COMTN_TRIG
3 ;
4 ; File Name: com_trig.asm
5 ;
6 ; Description:
7 ; |~~~~~~~~~~~~~~~|
8 ; cmtn_ptr_ct o------>| |
9 ; Va o------>| COMTN_TRIG |
10 ; Vb o------>| |----->o cmtn_trig
11 ; Vc o------>| |
12 ; v_timer o------>| |
13 ; |_______________|
14 ;
15 ; Note: v_timer (virtual timer) is a "global" resource
16 ;
17 ;
18 ;
19 ; History:
20 ;
21 ; Last Update: 06-23-2000
22 ;====================================================================================
23 ;(To use this Module, copy this section to main system file)
24 ; .ref COMTN_TRIG, COMTN_TRIG_INIT ;function call
25 ; .ref Va, Vb, Vc, cmtn_trig, cmtn_ptr_ct ;Inputs/output
26 ; .ref debug_Bemf, NW_DYN_THOLD
27 ; .ref cdnw_delta, noise_window_max
28 ;=====================================================================================
29 ;Module definitions for external reference.
30 .def COMTN_TRIG, COMTN_TRIG_INIT ;function call
31 .def Va, Vb, Vc, cmtn_trig, cmtn_ptr_ct ;Inputs/output
32 .def debug_Bemf, NW_DYN_THOLD
33 .def cdnw_delta, noise_window_max
34 .def zc_trig, neutral, rev_period
35 ;=====================================================================================
36 .include x24x_app.h
37
38
39 .ref v_timer
40 ;=====================================================================================
41 ;Variable Definitions for comtn_trig module
42 ;-------------------------------------------------------------------------------------
43 0000 cmtn_trig .usect "com_trig",1 ;Commutation trigger output
44 0001 cmtn_ptr_ct .usect "com_trig",1
45 0002 zc_trig .usect "com_trig",1
46 0003 dt_task_ptr .usect "com_trig",1
47 0004 neutral .usect "com_trig",1
48 0005 rev_period .usect "com_trig",1
49 0006 Va .usect "com_trig",1
50 0007 Vb .usect "com_trig",1
51 0008 Vc .usect "com_trig",1
52 0009 time_stamp_new .usect "com_trig",1
53 000a time_stamp_old .usect "com_trig",1
54 000b cmtn_delay .usect "com_trig",1
TMS320C24xx COFF Assembler Version 7.02 Sun Apr 27 20:39:39 2003
Copyright (c) 1987-2002 Texas Instruments Incorporated
com_trig.asm PAGE 2
55 000c cmtn_delay_cntr .usect "com_trig",1
56 000d D30_done_flg .usect "com_trig",1
57
58 000e noise_window_cntr .usect "com_trig",1
59 000f noise_window_max .usect "com_trig",1
60
61 0010 cdnw_delta .usect "com_trig",1
62 0011 NW_DYN_THOLD .usect "com_trig",1
63 0012 GPR0_COM_TRIG .usect "com_trig",1
64 0013 GPR1_COM_TRIG .usect "com_trig",1
65 0014 debug_Bemf .usect "com_trig",1
66
67 0000 CMTN_STATE_TBL:
68 0000 001c' .word CT_STATE_ANB ;cmtn_ptr_ct = 0, de-energized phase = C
69 0001 002a' .word CT_STATE_ANC ;cmtn_ptr_ct = 1, de-energized phase = B
70 0002 0038' .word CT_STATE_BNC ;cmtn_ptr_ct = 2, de-energized phase = A
71 0003 0046' .word CT_STATE_BNA ;cmtn_ptr_ct = 3, de-energized phase = C
72 0004 0054' .word CT_STATE_CNA ;cmtn_ptr_ct = 4, de-energized phase = B
73 0005 0064' .word CT_STATE_CNB ;cmtn_ptr_ct = 5, de-energized phase = A
74
75 ;=====================================================================================
76 0006 COMTN_TRIG_INIT:
77 ;=====================================================================================
78 0006 bc00- ldp #dt_task_ptr
79 0007 ae03- SPLK #CHK_TRIGGER, dt_task_ptr
0008 0098'
80 0009 ae0e- SPLK #0, noise_window_cntr
000a 0000
81 000b ef00 RET
82
83
84 ;=====================================================================================
85 000c COMTN_TRIG:
86 ;=====================================================================================
87 000c bc00- ldp #cmtn_trig
88 000d ae00- SPLK #0,cmtn_trig ;always clear flag on entry
000e 0000
89
90 ;--------------------------
91 ;Neutral voltage calculation:
92 ;----------------------------
93 000f NEU_CALC:
94 000f be47 SETC SXM ; Sign extension mode on
95 0010 1006- LACC Va
96 0011 2007- ADD Vb
97 0012 2008- ADD Vc ;Acc=3*neutral point voltage
98 0013 9004- SACL neutral ;Store 3*neutral point voltage
99
100 ;--------------------------
101 ;Commutation State table Tasks
102 ;--------------------------
103 0014 STATE_TASKS:
104 0014 ae02- SPLK #0h,zc_trig ;always clear flag on entry
0015 0000
TMS320C24xx COFF Assembler Version 7.02 Sun Apr 27 20:39:39 2003
Copyright (c) 1987-2002 Texas Instruments Incorporated
com_trig.asm PAGE 3
105 0016 bf80 LACC #CMTN_STATE_TBL ;point to State table
0017 0000'
106 0018 2001- ADD cmtn_ptr_ct
107 0019 a612- TBLR GPR0_COM_TRIG
108 001a 1012- LACC GPR0_COM_TRIG
109 001b be20 BACC
110
111 ;State 0 - ZC for phase C
112 ;-----------------------
113 001c CT_STATE_ANB:
114 001c 1108- LACC Vc,1 ;Fetch Vc
115 001d 2008- ADD Vc ;ACC=3*(Bemf + Neutral)
116 001e 3004- SUB neutral ;ACC=3*Bemf
117 001f 9014- SACL debug_Bemf
118 0020 e304 BCND CLR_NW_S0,GT ;BEMF Still positive?
0021 0026'
119 0022 7a80 CALL NOISE_WIN
0023 00ac'
120 0024 7980 B ST_END
0025 0094'
121
122 0026 ae0e- CLR_NW_S0 SPLK #0h,noise_window_cntr
0027 0000
123 0028 7980 B ST_END
0029 0094'
124
125 ;State 1 - ZC for phase B
126 ;-----------------------
127 002a CT_STATE_ANC:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -