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

📄 ccu6.lst

📁 xc164的空间矢量调制的恒压频比控制
💻 LST
📖 第 1 页 / 共 2 页
字号:
C166 COMPILER V6.02, CCU6                                                                  08/11/2006 11:28:57 PAGE 1   


C166 COMPILER V6.02, COMPILATION OF MODULE CCU6
OBJECT MODULE PLACED IN CCU6.OBJ
COMPILER INVOKED BY: C:\Keil\C166\BIN\C166.EXE CCU6.C MODV2 BROWSE MODV2 DEBUG

 stmt lvl     source

    1         //****************************************************************************
    2         // @Module        Capture / Compare Unit 6 (CCU6)
    3         // @Filename      CCU6.C
    4         // @Project       svpwm.dav
    5         //----------------------------------------------------------------------------
    6         // @Controller    Infineon XC164CM-8F40
    7         //
    8         // @Compiler      Keil
    9         //
   10         // @Codegenerator 0.2
   11         //
   12         // @Description   This file contains functions that use the CCU6 module.
   13         //
   14         //----------------------------------------------------------------------------
   15         // @Date          2006-8-11 11:11:01
   16         //
   17         //****************************************************************************
   18         
   19         // USER CODE BEGIN (CCU6_General,1)
   20         
   21         // USER CODE END
   22         
   23         
   24         
   25         //****************************************************************************
   26         // @Project Includes
   27         //****************************************************************************
   28         
   29         #include "MAIN.H"
   30         
   31         // USER CODE BEGIN (CCU6_General,2)
   32         #include "DEF.h"
   33         
   34         // USER CODE END
   35         
   36         
   37         //****************************************************************************
   38         // @Macros
   39         //****************************************************************************
   40         
   41         // USER CODE BEGIN (CCU6_General,3)
   42         
   43         // USER CODE END
   44         
   45         
   46         //****************************************************************************
   47         // @Defines
   48         //****************************************************************************
   49         
   50         // USER CODE BEGIN (CCU6_General,4)
   51         
   52         // USER CODE END
   53         
   54         
   55         //****************************************************************************
C166 COMPILER V6.02, CCU6                                                                  08/11/2006 11:28:57 PAGE 2   

   56         // @Typedefs
   57         //****************************************************************************
   58         
   59         // USER CODE BEGIN (CCU6_General,5)
   60         
   61         // USER CODE END
   62         
   63         
   64         //****************************************************************************
   65         // @Imported Global Variables
   66         //****************************************************************************
   67         
   68         // USER CODE BEGIN (CCU6_General,6)
   69         
   70         extern const int sin_table[1001];
   71         extern const int cos_table[1001];
   72         extern unsigned int TPWM; 
   73         // USER CODE END
   74         
   75         
   76         //****************************************************************************
   77         // @Global Variables
   78         //****************************************************************************
   79         
   80         // USER CODE BEGIN (CCU6_General,7)
   81         TComplex StatorCurrentQ15;  // staor current
   82         unsigned int angle;
   83         // USER CODE END
   84         
   85         
   86         //****************************************************************************
   87         // @External Prototypes
   88         //****************************************************************************
   89         
   90         // USER CODE BEGIN (CCU6_General,8)
   91         extern void SVM(TComplex  *m, char *Sector);
   92         // USER CODE END
   93         
   94         
   95         //****************************************************************************
   96         // @Prototypes Of Local Functions
   97         //****************************************************************************
   98         
   99         // USER CODE BEGIN (CCU6_General,9)
  100         
  101         // USER CODE END
  102         
  103         
  104         //****************************************************************************
  105         // @Function      void CCU6_vInit(void) 
  106         //
  107         //----------------------------------------------------------------------------
  108         // @Description   This is the initialization function of the CCU6 function 
  109         //                library. It is assumed that the SFRs used by this library 
  110         //                are in reset state. 
  111         //
  112         //----------------------------------------------------------------------------
  113         // @Returnvalue   None
  114         //
  115         //----------------------------------------------------------------------------
  116         // @Parameters    None
  117         //
C166 COMPILER V6.02, CCU6                                                                  08/11/2006 11:28:57 PAGE 3   

  118         //----------------------------------------------------------------------------
  119         // @Date          2006-8-11
  120         //
  121         //****************************************************************************
  122         
  123         // USER CODE BEGIN (Init,1)
  124         
  125         // USER CODE END
  126         
  127         void CCU6_vInit(void)
  128         {
  129  1        // USER CODE BEGIN (Init,2)
  130  1      
  131  1        // USER CODE END
  132  1      
  133  1        ///  -----------------------------------------------------------------------
  134  1        ///  Configuration of CCU6 Timer 12:
  135  1        ///  -----------------------------------------------------------------------
  136  1        ///  - prescaler factor is 4
  137  1        ///  - timer 12 run bit is set
  138  1        ///  - single shot mode is disabled
  139  1        ///  - timer 12 works in center aligned mode
  140  1        ///  - interrupt on period match is enabled
  141  1        ///  - interrupt on one match is disabled
  142  1      
  143  1        CCU6_T12PR     =  0x0164;      // load CCU6 T12 period register
  144  1      
  145  1        ///  -----------------------------------------------------------------------
  146  1        ///  Configuration of CCU6 Timer 13:
  147  1        ///  -----------------------------------------------------------------------
  148  1        ///  - prescaler factor is 1
  149  1        ///  - timer 13 run bit is reset
  150  1        ///  - trigger control is disabled
  151  1        ///  - single shot mode is disabled
  152  1        ///  - interrupt on period match is disabled
  153  1        ///  - interrupt on compare match is disabled
  154  1      
  155  1        CCU6_T13PR     =  0x0001;      // load CCU6 T13 period register
  156  1      
  157  1        CCU6_TCTR0     =  0x0082;      // load CCU6 timer control register 0
  158  1        CCU6_TCTR2     =  0x0020;      // load CCU6 timer control register 2
  159  1      
  160  1        ///  -----------------------------------------------------------------------
  161  1        ///  Configuration of Multi Channel Mode:
  162  1        ///  -----------------------------------------------------------------------
  163  1        ///  - multi channel mode is disabled
  164  1      
  165  1      
  166  1        ///  -----------------------------------------------------------------------
  167  1        ///  Configuration of CCU6 Channel 0:
  168  1        ///  -----------------------------------------------------------------------
  169  1        ///  - compare mode 3 is selected
  170  1        ///  - T12 modulation for output CC60 is enabled
  171  1        ///  - T13 modulation for output CC60 is disabled
  172  1        ///  - the trap functionality of the pin CC60 is disabled
  173  1        ///  - the compare output CC60 drives passive level while CC60ST is '0'
  174  1        ///  - the passive level of the output CC60 is '0'
  175  1        ///  - T12 modulation for output COUT60 is enabled
  176  1        ///  - T13 modulation for output COUT60 is disabled
  177  1        ///  - the trap functionality of the pin COUT60 is disabled
  178  1        ///  - the compare output COUT60 drives passive level while CC60ST is '1'
  179  1        ///  - the passive level of the output COUT60 is '0'
C166 COMPILER V6.02, CCU6                                                                  08/11/2006 11:28:57 PAGE 4   

  180  1        ///  - dead time generation is enabled
  181  1      
  182  1        ///  - generation interrupt on flag ICC60R is disabled
  183  1        ///  - generation interrupt on flag ICC60F is disabled
  184  1      
  185  1        CCU6_CC60SR    =  0x0000;      // load CCU6 capture/compare shadow register 
  186  1                                       // for channel 0
  187  1      
  188  1        ///  -----------------------------------------------------------------------
  189  1        ///  Configuration of CCU6 Channel 1:
  190  1        ///  -----------------------------------------------------------------------
  191  1        ///  - compare mode 3 is selected
  192  1        ///  - T12 modulation for output CC61 is enabled
  193  1        ///  - T13 modulation for output CC61 is disabled
  194  1        ///  - the trap functionality of the pin CC61 is disabled
  195  1        ///  - the compare output CC61 drives passive level while CC61ST is '0'
  196  1        ///  - the passive level of the output CC61 is '0'
  197  1        ///  - T12 modulation for output COUT61 is enabled
  198  1        ///  - T13 modulation for output COUT61 is disabled
  199  1        ///  - the trap functionality of the pin COUT61 is disabled
  200  1        ///  - the compare output COUT61 drives passive level while CC61ST is '1'
  201  1        ///  - the passive level of the output COUT61 is '0'

⌨️ 快捷键说明

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