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

📄 volt_cal.lst

📁 TI的digital motor control lib的源代码。了解TI的编程规范
💻 LST
📖 第 1 页 / 共 2 页
字号:
C:\TIC2XX\C2000\CGTOOLS\BIN\DSPA.EXE -q -v2xx -gs volt_cal.asm -o ..\obj\volt_cal.obj -l ..\temp\volt_cal.lst 

TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00  Tue May  6 12:41:13 2003
Copyright (c) 1987-1999  Texas Instruments Incorporated 
volt_cal.asm                                                         PAGE    1

       1            ;=====================================================================================
       2            ; File name:        VOLT_CAL.ASM                       
       3            ;                    
       4            ; Originator:   Digital Control Systems Group
       5            ;                       Texas Instruments
       6            ;
       7            ; Description:                                 
       8            ; Calculates the 3 Phase Motor voltages and stationary 
       9            ; dq-axis voltages based on the PWM modulating function 
      10            ; & DC bus voltage measurement.
      11            ;=====================================================================================
      12            ; History:
      13            ;-------------------------------------------------------------------------------------
      14            ; 9-15-2000     Release Rev 1.0
      15            ;================================================================================
      16            ; Applicability: F240,F241,C242,F243,F24xx.  (Peripheral Independent).
      17            ;================================================================================
      18            ; Routine Name: phase_voltage_calc                      Routine Type: C Callable
      19            ;  
      20            ;  C prototype : void phase_voltage_calc(struct PHASEVOLTAGE *p);
      21            ;
      22            ;        The struct object is defined in the header file "volt_cal.h" as follows:
      23            ;
      24            ;       typedef struct  { int  DC_bus;          /* Input: DC-bus voltage (Q15) */ 
      25            ;                                         int  Mfunc_V1;        /* Input: Modulation voltage phase A (Q15) */ 
      26            ;                                         int  Mfunc_V2;        /* Input: Modulation voltage phase B (Q15) */   
      27            ;                                         int  Mfunc_V3;        /* Input: Modulation voltage phase C (Q15) */ 
      28            ;                                         int  Vphase_A;        /* Output: Phase voltage phase A (Q15) */ 
      29            ;                                         int  Vphase_B;        /* Output: Phase voltage phase B (Q15) */ 
      30            ;                                         int  Vphase_C;        /* Output: Phase voltage phase C (Q15) */ 
      31            ;                                         int  Vdirect;         /* Output: Stationary d-axis phase voltage (Q15)
      32            ;                                         int  Vquadra;         /* Output: Stationary q-axis phase voltage (Q15)
      33            ;                                         int  (*calc)();       /* Pointer to calculation function */ 
      34            ;                                       } PHASEVOLTAGE; 
      35            ;                                                                        
      36            ;        Frame Usage Details:
      37            ;     step   |      a      |      b       |      c      |     d     
      38            ;____________|_____________|______________|_____________|_____________
      39            ;     FR0        | one_third   |    sqrt3inv  |             |     
      40            ;
      41            ;================================================================================
      42                            .def        _phase_voltage_calc
      43            ;================================================================================
      44      0001  __phase_voltage_calc_framesize  .set 0001h
      45            ;----------------------------------------------------------------------------------
      46      0001  out_of_phase_   .set    1                       ; set 1 for the out of phase correction if
      47                                                                                    ;  - Mfunc_V1 is out of phase with PWM1,
      48                                                                                    ;  - Mfunc_V2 is out of phase with PWM3,
      49                                                                                    ;  - Mfunc_V3 is out of phase with PWM5
      50                                                                                    ; otherwise, set 0 if their phases are c
      51            ; Important!! Note that the default out_of_phase_ is 1, if it is neccessary to be changed, the 
      52            ; module library (e.g., clib_011.lib) must be rebuilt to take the effect.  
      53            ;================================================================================
      54 0000       _phase_voltage_calc:
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00  Tue May  6 12:41:13 2003
Copyright (c) 1987-1999  Texas Instruments Incorporated 
volt_cal.asm                                                         PAGE    2

      55                                                                                                                    ; Assume
      56 0000 8aa0          POPD    *+                                                                      ; Keep return address
      57 0001 80a0          SAR     AR0,*+                                                          ; Keep old frame pointer (FP)
      58 0002 8180          SAR     AR1,*                                                           ; Keep old stack pointer (SP)
      59 0003 b001          LARK    AR0,__phase_voltage_calc_framesize      ; Load AR0 with frame size      
      60 0004 00e8          LAR     AR0,*0+,AR0                                                     ; AR0->FP0 (new FP), ARP=AR0
      61            
      62            ;================================================================================
      63 0005 7c03                  SBRK    #3              ; ARP=AR0, AR0->FR0-3 (1st argument)            
      64            ;----------------------------------------------------------------------------------
      65 0006 0280                  LAR             AR2,*   ; ARP=AR0, AR0->DC_bus, AR2->DC_bus                     
      66            ;----------------------------------------------------------------------------------
      67 0007 7803                  ADRK    #3              ; ARP=AR0, AR0->FR0, AR2->DC_bus 
      68            ;----------------------------------------------------------------------------------
      69 0008 8b8a                  MAR             *,AR2   ; ARP=AR2, AR0->FR0, AR2->DC_bus 
      70            ;----------------------------------------------------------------------------------
      71 0009 be47                  SETC    SXM             ; Turn sign extension mode on
      72                                                            ; ARP=AR2, AR0->FR0, AR2->DC_bus 
      73            ;----------------------------------------------------------------------------------
      74 000a be43                  SETC    OVM             ; Set overflow mode
      75                                                            ; ARP=AR2, AR0->FR0, AR2->DC_bus
      76            ;----------------------------------------------------------------------------------
      77 000b bf00                  SPM     0       ; Reset product mode
      78                                                    ; ARP=AR2, AR0->FR0, AR2->DC_bus 
      79            ;----------------------------------------------------------------------------------                     
      80                    .if (out_of_phase_) ; ARP=AR2, AR0->FR0, AR2->DC_bus
      81            ;----------------------------------------------------------------------------------             
      82 000c 7801                  ADRK    #1              ; ARP=AR2, AR0->FR0, AR2->Mfunc_V1
      83            ;---------------------------------------------------------------------------------- 
      84 000d 1080                  LACC    *               ; ACC = Mfunc_V1
      85                                                            ; ARP=AR2, AR0->FR0, AR2->Mfunc_V1
      86            ;----------------------------------------------------------------------------------             
      87 000e be02                  NEG                     ; ACC = -Mfunc_V1   
      88                                                            ; ARP=AR2, AR0->FR0, AR2->Mfunc_V1
      89            ;----------------------------------------------------------------------------------             
      90 000f 90a0                  SACL    *+              ; Mfunc_V1 = -Mfunc_V1 (phase corrected)
      91                                                            ; ARP=AR2, AR0->FR0, AR2->Mfunc_V2 
      92            ;----------------------------------------------------------------------------------             
      93 0010 1080                  LACC    *               ; ACC = Mfunc_V2
      94                                            ; ARP=AR2, AR0->FR0, AR2->Mfunc_V2
      95            ;---------------------------------------------------------------------------------- 
      96 0011 be02                  NEG                     ; ACC = -Mfunc_V2   
      97                                                            ; ARP=AR2, AR0->FR0, AR2->Mfunc_V2
      98            ;---------------------------------------------------------------------------------- 
      99 0012 90a0                  SACL    *+              ; Mfunc_V2 = -Mfunc_V2 (phase corrected)
     100                                                            ; ARP=AR2, AR0->FR0, AR2->Mfunc_V3              
     101            ;---------------------------------------------------------------------------------- 
     102 0013 1080                  LACC    *               ; ACC = Mfunc_V3
     103                                            ; ARP=AR2, AR0->FR0, AR2->Mfunc_V3      
     104            ;---------------------------------------------------------------------------------- 
     105 0014 be02                  NEG                     ; ACC = -Mfunc_V3 
     106                                                            ; ARP=AR2, AR0->FR0, AR2->Mfunc_V3
     107            ;----------------------------------------------------------------------------------             
     108 0015 9080                  SACL    *               ; Mfunc_V3 = -Mfunc_V3 (phase corrected)
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00  Tue May  6 12:41:13 2003
Copyright (c) 1987-1999  Texas Instruments Incorporated 
volt_cal.asm                                                         PAGE    3

     109                                                            ; ARP=AR2, AR0->FR0, AR2->Mfunc_V3      
     110            ;---------------------------------------------------------------------------------- 
     111 0016 7c03                  SBRK    #3              ; ARP=AR2, AR0->FR0, AR2->DC_bus        
     112            ;---------------------------------------------------------------------------------- 
     113                            .endif
     114            ;----------------------------------------------------------------------------------                             
     115 0017 73a0                  LT              *+              ; TREG = DC_bus
     116                                                            ; ARP=AR2, AR0->FR0, AR2->Mfunc_V1
     117            ;----------------------------------------------------------------------------------
     118 0018 5480                  MPY             *               ; PREG = DC_bus*Mfunc_V1
     119                                                            ; ARP=AR2, AR0->FR0, AR2->Mfunc_V1
     120            ;----------------------------------------------------------------------------------
     121 0019 be03                  PAC                             ; ACC = DC_bus*Mfunc_V1
     122                                                            ; ARP=AR2, AR0->FR0, AR2->Mfunc_V1 
     123            ;----------------------------------------------------------------------------------
     124 001a 99a0                  SACH    *+,1    ; Mfunc_V1 = DC_bus*Mfunc_V1
     125                                                            ; ARP=AR2, AR0->FR0, AR2->Mfunc_V2 
     126            ;----------------------------------------------------------------------------------
     127 001b 5480                  MPY             *               ; PREG = DC_bus*Mfunc_V2
     128                                                            ; ARP=AR2, AR0->FR0, AR2->Mfunc_V2
     129            ;----------------------------------------------------------------------------------
     130 001c be03                  PAC                             ; ACC = DC_bus*Mfunc_V2
     131                                                            ; ARP=AR2, AR0->FR0, AR2->Mfunc_V2 
     132            ;----------------------------------------------------------------------------------
     133 001d 99a0                  SACH    *+,1    ; Mfunc_V2 = DC_bus*Mfunc_V2
     134                                                            ; ARP=AR2, AR0->FR0, AR2->Mfunc_V3 
     135            ;----------------------------------------------------------------------------------
     136 001e 5480                  MPY             *               ; PREG = DC_bus*Mfunc_V3
     137                                                            ; ARP=AR2, AR0->FR0, AR2->Mfunc_V3
     138            ;----------------------------------------------------------------------------------
     139 001f be03                  PAC                             ; ACC = DC_bus*Mfunc_V3
     140                                                            ; ARP=AR2, AR0->FR0, AR2->Mfunc_V3 
     141            ;----------------------------------------------------------------------------------
     142 0020 9990                  SACH    *-,1    ; Mfunc_V3 = DC_bus*Mfunc_V3
     143                                                            ; ARP=AR2, AR0->FR0, AR2->Mfunc_V2
     144            ;----------------------------------------------------------------------------------
     145 0021 8b98                  MAR             *-,AR0  ; ARP=AR2, AR0->FR0, AR2->Mfunc_V1, ARP=AR0 
     146            ;----------------------------------------------------------------------------------

⌨️ 快捷键说明

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