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

📄 f2407adc2.lst

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

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

       1            ;===============================================================================================================
       2            ; File name:       F2407ADC2.ASM                    
       3            ;                    
       4            ; Originator:   Digital Control Systems Group
       5            ;                       Texas Instruments
       6            ; Description:                                   
       7            ; This file contains source for the ADC Driver control module
       8            ; Applicability of these functions is indicated in the Table 1               
       9            ;=====================================================================================
      10            ; History:
      11            ;-------------------------------------------------------------------------------------
      12            ; 9-15-2000     Release Rev 1.0
      13            ;================================================================================
      14            ; Applicability: F240,F241,C242,F243,F24xx.  (Peripheral dependant).
      15            ;
      16            ;================================================================================
      17            ;                           T A B L E      1                                 
      18            ;================================================================================
      19            ;     Function Name    |    Applicability                                    
      20            ;================================================================================
      21            ;                      |      F240 | F241| F243 | LF2402 | LF2406 | LF2407   
      22            ;                      |           |     |      |        |        |          
      23            ; F2407_ADC_Update     |           |     |      |        |        |  Y        
      24            ;================================================================================
      25            
      26            ;================================================================================
      27            ; Routine Name: ADC DRIVER           Routine Type: C Callable
      28            ;
      29            ; Description:
      30            ;  
      31            ; C prototype : void F2407_ADC_Update(ADCVALS *p);
      32            ; History   created August 21,2000
      33            ;================================================================================
      34            ; Definition of ADCVALS
      35            ;
      36            ;typedef struct {
      37            ;                int C1_gain;
      38            ;                int C2_gain;
      39            ;                int C3_gain;
      40            ;                int C4_gain;           
      41            ;
      42            ;                int C1_out;
      43            ;                int C2_out;
      44            ;                int C3_out;
      45            ;                int C4_out;               
      46            ;
      47            ;                int A4_ch_sel;
      48            ;                int (*init)();                                 
      49            ;                int (*update)();                               
      50            ;             } ADCVALS;
      51            ;
      52            ;
      53            ;                        
      54                            .include ..\include\x240x.h
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00  Tue May  6 12:42:12 2003
Copyright (c) 1987-1999  Texas Instruments Incorporated 
f2407adc2.asm                                                        PAGE    2

      55            
      56                            .def  _F2407_ADC_Update   
      57            ;================================================================================                       
      58            
      59 0000       _F2407_ADC_Update: 
      60            
      61      0001  __F2407_ADC_Update_framesize  .set 0001h
      62            
      63               
      64            ;--------------------------------------------------------------------------
      65                                            ; ARP = AR1
      66            
      67                                            ; AR1 is  stack pointer (SP)
      68                                            ; AR0 is frame pointer (FP)
      69                  
      70 0000 8aa0      POPD *+                     ; Save the return address from hardware
      71                                            ; stack onto the software stack
      72                                            ; ARP = AR1
      73                
      74 0001 80a0      SAR  AR0, *+                ; push AR0(FP). ARP =AR1
      75 0002 8180      SAR  AR1, *                 ; *SP = SP. ARP =AR1
      76 0003 b001      LAR  AR0, #__F2407_ADC_Update_framesize 
      77                                            ; FP  = size of frame 
      78 0004 00e8      LAR  AR0, *0+, AR0          ; ARP = AR0.
      79                                            ; Allocate frame. AR0 = *AR1
      80                                            ; AR1 = AR1 + AR0.    
      81            ;--------------------------------------------------------------------------
      82 0005 7c03                  SBRK    #3      ; AR0 -> Passed parameter(i.e. pointer
      83                                            ; to the ADCVALS structure)
      84                                            ; ARP = AR0.
      85            ;--------------------------------------------------------------------------
      86 0006 0280                  LAR     AR2,*   ; AR2 points to the first structure member  
      87                                            ; (i.e. AR2 -> c1_gain). ARP = AR0.
      88            ;--------------------------------------------------------------------------
      89 0007 0380                  LAR     AR3,*   ; AR3 points to the first structure member 
      90                                            ; (i.e. AR3 -> c1_gain). ARP = AR0.
      91                                            ; AR2 -> c1_gain.
      92            ;--------------------------------------------------------------------------
      93 0008 7803                  ADRK    #3      ; Let AR0  be again FP.
      94                                            ; AR3 -> c1_gain. AR2 -> c1_gain
      95            ;--------------------------------------------------------------------------                                
      96 0009 8b8a                  MAR     *,AR2   ; ARP = AR2.
      97                                            ; AR3 -> c1_gain. AR2 -> c1_gain
      98            ;--------------------------------------------------------------------------
      99 000a bce1                  LDP     #ADCL_CNTL1 >>7
     100 000b 1028                  LACC    ADC_RESULT0 
     101                                            ; Load Accumulator with 
     102                                            ; ADC_RESULT0 status 
     103                                            ; ARP = AR2.,AR2 -> c1_gain. 
     104                                            ; AR3 -> c1_gain
     105            ;--------------------------------------------------------------------------                                
     106 000c be0a                  SFR             ; Right shift Accumulator 
     107                                            ; contents by one bit
     108                                            ; ARP = AR2.  AR2-> c1_gain. 
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00  Tue May  6 12:42:12 2003
Copyright (c) 1987-1999  Texas Instruments Incorporated 
f2407adc2.asm                                                        PAGE    3

     109                                            ; AR3 -> c1_gain
     110            ;--------------------------------------------------------------------------                                
     111 000d bfb0                  AND     #7FFFh  ; Accumulator = Accumulator & 7FFFh
         000e 7fff  
     112                                            ; ARP = AR2. AR2-> c1_gain. 
     113                                            ; AR3 -> c1_gain
     114            ;--------------------------------------------------------------------------                                    
     115 000f 7804                  ADRK    #4      ; Points to c1_out
     116                                            ; ARP = AR2. AR2-> c1_out. 
     117                                            ; AR3 -> c1_gain
     118            ;--------------------------------------------------------------------------               
     119 0010 908b                  SACL    *,AR3   ; Accumulator = c1_out
     120                                            ; ARP = AR3. AR2 -> c1_out. 
     121                                            ; AR3 -> c1_gain
     122            ;--------------------------------------------------------------------------
     123 0011 73aa                  LT      *+,AR2  ; TREG = c1_gain in Q13 
     124                                            ; ARP = AR2. AR2 -> c1_out. 
     125                                            ; AR3 -> c2_gain
     126            ;--------------------------------------------------------------------------
     127 0012 5480                  MPY     *       ; PREG = c1_gain * c1_out (Q13 x Q15 = Q28)
     128                                            ; ARP = AR2. AR2 -> c1_out. 
     129                                            ; AR3 -> c2_gain
     130            ;--------------------------------------------------------------------------
     131 0013 be03                  PAC             ; Accumulator = c1_gain * c1_out
     132                                            ; ARP = AR2. AR2 -> c1_out. 
     133                                            ; AR3 -> c2_gain
     134            ;--------------------------------------------------------------------------
     135 0014 9ba0                  SACH    *+,3    ; Convert final result to Q15 
     136                                            ; ARP = AR2. AR2 -> c2_out. 
     137                                            ; AR3 -> c2_gain
     138            ;--------------------------------------------------------------------------            
     139                   ;Read 2nd converted value
     140                    
     141 0015 bce1                  LDP     #ADCL_CNTL1 >>7
     142 0016 1029                  LACC    ADC_RESULT1
     143                                            ; Load Accumulator with ADC_RESULT1 status  

⌨️ 快捷键说明

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