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

📄 pmsm31.lst

📁 本程序来自TI公司网站原程序,其功能是通过传统的矢量控制算法来实现对永磁同步电机的控制,矢量控制采用双闭环结构
💻 LST
📖 第 1 页 / 共 5 页
字号:
     592 0028 8b9b          MAR     *-,AR3
     593                    .line   65
     594            ;>>>>               EVAIFRA=0xffff;        
     595            ;>>>>   #endif  /* TARGET */
     596 0029 bf0b          LARK    AR3,29743
         002a 742f  
     597 002b ae80          SPLK    #-1,* 
         002c ffff  
     598                    .line   71
     599            ;>>>>           dac.qptr0=&foc.svgen.va;
     600 002d bf80          LALK    _foc+30
         002e 0051- 
     601 002f bc00-         LDPK    _dac
     602 0030 9007-         SACL    _dac
     603                    .line   72
     604            ;>>>>           dac.qptr1=&foc.svgen.vb;
     605 0031 bf80          LALK    _foc+31
         0032 0052- 
     606 0033 9008-         SACL    _dac+1
     607                    .line   73
     608            ;>>>>           dac.qptr2=&foc.svgen.vc;
     609 0034 bf80          LALK    _foc+32
         0035 0053- 
     610 0036 9009-         SACL    _dac+2
TMS320C24xx COFF Assembler Version 7.02  Wed Apr 30 15:30:41 2003
Copyright (c) 1987-2002  Texas Instruments Incorporated 
../temp/pmsm31.asm                                                   PAGE   14

     611                    .line   74
     612            ;>>>>           dac.qptr3=&foc.rg.rmp_out;
     613            ;>>>>   #endif /* (BUILDLEVEL==LEVEL1) */  
     614            ;>>>>   #if (BUILDLEVEL==LEVEL2)
     615            ;>>>>   #if     TARGET==F243                      
     616            ;>>>>           pwm.period_max=667;          /* This is based on 15kHz PWM frequency (20MHz) */
     617            ;>>>>   #elif   TARGET==F2407                                                          
     618            ;>>>>           pwm.period_max=1333;       /* This is based on 15kHz PWM frequency (40MHz)*/
     619            ;>>>>   #endif  /* TARGET */            
     620            ;>>>>           FOC_TI_Init(&foc);
     621            ;>>>>           rtmon_init();            /* Call the monitor init function           */
     622            ;>>>>           enable_ints();           /* Set off the system running.              */
     623            ;>>>>           while(drive.enable_flg==0)
     624            ;>>>>           drive.init(&drive);
     625            ;>>>>           pwm.init(&pwm);
     626            ;>>>>           ilg2.init(&ilg2);
     627            ;>>>>           dac.qptr0=&ilg2.out_a;
     628            ;>>>>           dac.qptr1=&ilg2.out_b;
     629            ;>>>>           dac.qptr2=&foc.rg.rmp_out;
     630            ;>>>>           dac.qptr3=&foc.voltage_dq.q;
     631            ;>>>>   #endif /* (BUILDLEVEL==LEVEL2) */   
     632            ;>>>>   #if (BUILDLEVEL==LEVEL3)
     633            ;>>>>   #if     TARGET==F243                      
     634            ;>>>>           pwm.period_max=667;          /* This is based on 15kHz PWM frequency (20MHz) */
     635            ;>>>>   #elif   TARGET==F2407                                                          
     636            ;>>>>           pwm.period_max=1333;       /* This is based on 15kHz PWM frequency (40MHz)*/
     637            ;>>>>   #endif  /* TARGET */            
     638            ;>>>>           FOC_TI_Init(&foc);
     639            ;>>>>           rtmon_init();            /* Call the monitor init function           */
     640            ;>>>>           enable_ints();           /* Set off the system running.              */
     641            ;>>>>           while(drive.enable_flg==0)
     642            ;>>>>           drive.init(&drive);
     643            ;>>>>           pwm.init(&pwm);          
     644            ;>>>>           ilg2.init(&ilg2);
     645            ;>>>>           dac.qptr0=&ilg2.out_a;
     646            ;>>>>           dac.qptr1=&foc.svgen.vb;
     647            ;>>>>           dac.qptr2=&foc.svgen.vc;
     648            ;>>>>           dac.qptr3=&foc.rg.rmp_out;
     649            ;>>>>   #endif /* (BUILDLEVEL==LEVEL3) */   
     650            ;>>>>   #if (BUILDLEVEL==LEVEL4)
     651            ;>>>>   #if     TARGET==F243                      
     652            ;>>>>           pwm.period_max=667;          /* This is based on 15kHz PWM frequency (20MHz) */
     653            ;>>>>   #elif   TARGET==F2407                                                          
     654            ;>>>>           pwm.period_max=1333;       /* This is based on 15kHz PWM frequency (40MHz)*/
     655            ;>>>>   #endif  /* TARGET */            
     656            ;>>>>           FOC_TI_Init(&foc);
     657            ;>>>>           rtmon_init();            /* Call the monitor init function           */
     658            ;>>>>           enable_ints();           /* Set off the system running.              */
     659            ;>>>>           while(drive.enable_flg==0)
     660            ;>>>>           drive.init(&drive);
     661            ;>>>>           pwm.init(&pwm);          
     662            ;>>>>           qep.init(&qep);     
     663            ;>>>>           speed.K1_fr = 4800;  
     664            ;>>>>           speed.K2_fr = 32361;
TMS320C24xx COFF Assembler Version 7.02  Wed Apr 30 15:30:41 2003
Copyright (c) 1987-2002  Texas Instruments Incorporated 
../temp/pmsm31.asm                                                   PAGE   15

     665            ;>>>>           speed.K3_fr = 407;
     666            ;>>>>           speed.rpm_max = 6000;
     667            ;>>>>           ilg2.init(&ilg2);
     668            ;>>>>           dac.qptr0=&foc.rg.rmp_out;
     669            ;>>>>           dac.qptr1=&foc.svgen.va;
     670            ;>>>>           dac.qptr2=&qep.theta_elec;
     671            ;>>>>           dac.qptr3=&foc.svgen.vb;
     672            ;>>>>   #endif /* (BUILDLEVEL==LEVEL4) */  
     673            ;>>>>   #if (BUILDLEVEL==LEVEL5)
     674            ;>>>>   #if     TARGET==F243                      
     675            ;>>>>           pwm.period_max=667;          /* This is based on 15kHz PWM frequency (20MHz) */
     676            ;>>>>   #elif   TARGET==F2407                                                          
     677            ;>>>>           pwm.period_max=1333;       /* This is based on 15kHz PWM frequency (40MHz)*/
     678            ;>>>>   #endif  /* TARGET */            
     679            ;>>>>           FOC_TI_Init(&foc);
     680            ;>>>>           rtmon_init();            /* Call the monitor init function           */
     681            ;>>>>           enable_ints();           /* Set off the system running.              */
     682            ;>>>>           while(drive.enable_flg==0)
     683            ;>>>>           drive.init(&drive);
     684            ;>>>>           pwm.init(&pwm);          
     685            ;>>>>           qep.init(&qep);     
     686            ;>>>>           speed.K1_fr = 4800;  
     687            ;>>>>           speed.K2_fr = 32361;
     688            ;>>>>           speed.K3_fr = 407;
     689            ;>>>>           speed.rpm_max = 6000;
     690            ;>>>>           ilg2.init(&ilg2);
     691            ;>>>>           dac.qptr0=&ilg2.out_a;
     692            ;>>>>           dac.qptr1=&foc.svgen.va;
     693            ;>>>>           dac.qptr2=&qep.theta_elec;
     694            ;>>>>           dac.qptr3=&foc.svgen.vb;
     695            ;>>>>   #endif /* (BUILDLEVEL==LEVEL5) */  
     696            ;>>>>   #if     TARGET==F243                      
     697            ;>>>>           EVIFRA=0x0ffff;           /* Clear all Group A EV interrupt flags    */
     698            ;>>>>   #elif   TARGET==F2407                                                          
     699 0037 bf80          LALK    _foc+103
         0038 009a- 
     700 0039 900a-         SACL    _dac+3
     701                    .line   381
     702            ;>>>>           EVAIFRA=0x0ffff;          /* Clear all EV1 Group A EV interrupt flags*/
     703            ;>>>>   #endif              
     704            ;>>>>           while(1)             /* Nothing running in the background at present */
     705 003a ae80          SPLK    #-1,* 
         003b ffff  
     706 003c       L3:
     707                    .line   389
     708 003c 7980          B       L3
         003d 003c' 
     709                    .endfunc        494,000000000H,1
     710            
     711                    .sym    _c_int02,_c_int02,32,2,0
     712                    .globl  _c_int02
     713            
     714                    .func   497
     715            ;>>>>   void interrupt c_int02()
TMS320C24xx COFF Assembler Version 7.02  Wed Apr 30 15:30:41 2003
Copyright (c) 1987-2002  Texas Instruments Incorporated 
../temp/pmsm31.asm                                                   PAGE   16

     716            ******************************************************
     717            * FUNCTION DEF : _c_int02
     718            ******************************************************
     719 003e       _c_int02:
     720 003e 7a80          CALL    I$$SAVE
         003f 0000! 
     721 0040 8180          SAR     AR1,*
     722 0041 b001          LARK    AR0,1
     723 0042 00e0          LAR     AR0,*0+
     724            
     725                    .line   3
     726            ;>>>>        asm("      CLRC     XF ");    
     727 0043 be4c        CLRC     XF 
     728                    .line   5
     729            ;>>>>           isr_ticker++;
     730            ;>>>>   #if (BUILDLEVEL==LEVEL1)
     731            ;>>>>   #if     TARGET==F243                      
     732            ;>>>>           EVIFRA=0x0ffff;           /* Clear all Group A EV interrupt flags    */
     733            ;>>>>   #elif   TARGET==F2407                                                          
     734 0044 bc00-         LDPK    _isr_ticker
     735 0045 1000-         LAC     _isr_ticker
     736 0046 b801          ADDK    1
     737 0047 9000-         SACL    _isr_ticker
     738                    .line   13
     739            ;>>>>           EVAIFRA=0x0ffff;          /* Clear all EV1 Group A EV interrupt flags*/
     740            ;>>>>   #endif              
     741 0048 bf0b          LARK    AR3,29743
         0049 742f  
     742 004a 8b8b          MAR     * ,AR3
     743 004b ae89          SPLK    #-1,* ,AR1
         004c ffff  
     744                    .line   19
     745            ;>>>>           drive.calc(&drive);
     746 004d bf80          LALK    _drive+0
         004e 0004- 
     747 004f 90a0          SACL    *+
     748 0050 1006-         LAC     _drive+2
     749 0051 be30          CALA
     750 0052 8b90          MAR     *-
     751                    .line   25
     752            ;>>>>           FOC_TI_Run(&foc); 
     753 0053 bf80          LALK    _foc+0
         0054 0033- 
     754 0055 90a0          SACL    *+
     755 0056 7a80          CALL    _FOC_TI_Run
         0057 0000! 
     756 0058 8b90          MAR     *-
     757                    .line   31
     758            ;>>>>           pwm.mfunc_c1 = foc.svgen.va;         
     759 0059 bc00-         LDPK    _foc+30
     760 005a a951-         BLDD    _foc+30,#_pwm+2
         005b 000f- 
     761                    .line   32
     762            ;>>>>           pwm.mfunc_c2 = foc.svgen.vb;
TMS320C24xx COFF Assembler Version 7.02  Wed Apr 30 15:30:41 2003
Copyright (c) 1987-2002  Texas Instruments Incorporated 
../temp/pmsm31.asm                                                   PAGE   17

     763 005c a810-         BLKD    #_foc+31,_pwm+3
         005d 0052- 
     764                    .line   33
     765            ;>>>>           pwm.mfunc_c3 = foc.svgen.vc;
     766 005e a811-         BLKD    #_foc+32,_pwm+4
         005f 0053- 
     767                    .line   34
     768            ;>>>>           pwm.update(&pwm);
     769 0060 bf80          LALK    _pwm+0
         0061 000d- 
     770 0062 90a0          SACL    *+
     771 0063 1013-         LAC     _pwm+6
     772 0064 be30          CALA
     773 0065 8b90          MAR     *-
     774                    .line   39
     775            ;>>>>           dac.update(&dac);
     776            ;>>>>   #endif /* BUILDLEVEL==LEVEL1 */
     777            ;>>>>   #if (BUILDLEVEL==LEVEL2)
     778            ;>>>>   #if     TARGET==F243                      
     779            ;>>>>           EVIFRA=0x0ffff;           /* Clear all Group A EV interrupt flags    */
     780            ;>>>>   #elif   TARGET==F2407                                                          
     781            ;>>>>           EVAIFRA=0x0ffff;          /* Clear all EV1 Group A EV interrupt flags*/
     782            ;>>>>   #endif              
     783            ;>>>>           drive.calc(&drive);
     784            ;>>>>           FOC_TI_Run(&foc); 
     785            ;>>>>           pwm.mfunc_c1 = foc.svgen.va;         
     786            ;>>>>           pwm.mfunc_c2 = foc.svgen.vb;
     787            ;>>>>           pwm.mfunc_c3 = foc.svgen.vc;
     788            ;>>>>           pwm.update(&pwm);
     789            ;>>>>           ilg2.read(&ilg2);
     790            ;>>>>                   foc.current_abc.a = ilg2.out_a;
     791            ;>>>>                   foc.current_abc.b = ilg2.out_b;
     792            ;>>>>                   foc.current_abc.c = -(ilg2.out_a+ilg2.out_b);        
     793            ;>>>>           dac.update(&dac);
     794            ;>>>>   #endif /* BUILDLEVEL==LEVEL2 */
     795            ;>>>>   #if (BUILDLEVEL==LEVEL3)
     796            ;>>>>   #if     TARGET==F243                      
     797            ;>>>>           EVIFRA=0x0ffff;           /* Clear all Group A EV interrupt flags    */
     798            ;>>>>   #elif   TARGET==F2407                                                          
     799            ;>>>>           EVAIFRA=0x0ffff;          /* Clear all EV1 Group A EV interrupt flags*/
     800            ;>>>>   #endif              
     801            ;>>>>           drive.calc(&drive);

⌨️ 快捷键说明

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