C51 COMPILER V9.52.0.0   INTERRUPT                                                         09/28/2018 15:04:30 PAGE 1   


C51 COMPILER V9.52.0.0, COMPILATION OF MODULE INTERRUPT
OBJECT MODULE PLACED IN .\Output\Interrupt.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE ..\User\Source\Application\Interrupt.c LARGE OMF2 WARNINGLEVEL(0) BROWSE IN
                    -CDIR(..\Library\FU68xx_Hardware_Driver\Include;..\User\Include) DEBUG PRINT(.\Listing\Interrupt.lst) OBJECT(.\Output\Int
                    -errupt.obj)

line level    source

   1          /**************************** (C) COPYRIGHT 2017 Fortiortech shenzhen *****************************
   2          * File Name          : Interrupt.c
   3          * Author             : Vina Peng,Fortiortech  Appliction Team
   4          * Version            : V1.0
   5          * Date               : 2017-12-26
   6          * Description        : This file contains all the interrupt function used for Motor Control.
   7          ***************************************************************************************************
   8          * All Rights Reserved
   9          **************************************************************************************************/
  10          
  11          /* Includes -------------------------------------------------------------------------------------*/
  12          #include <FU68xx_2.h>
  13          /*---------------------------------------------------------------------------*/
  14          /* Name     :   void TIM4_INT(void) interrupt 10
  15          /* Input    :   NO
  16          /* Output   :   NO
  17          /* Description: Capture PWM ，中断优先级第二，高于FOC中断，用于PWM调速
  18          /*---------------------------------------------------------------------------*/
  19          uint16 PWMCompare;
  20          uint16 PWMARR;
  21          
  22          void TIM4_INT(void) interrupt 10
  23          {    
  24   1          if(ReadBit(TIM4_CR1, T4IR))                            //高电平 或  低电平检测中断
  25   1          {
  26   2              PWMCompare = TIM4__DR;
  27   2              ClrBit(TIM4_CR1, T4IR);
  28   2          }
  29   1          
  30   1          if(ReadBit(TIM4_CR1, T4IP))                             //周期中断
  31   1          {
  32   2              PWMARR = TIM4__ARR;
  33   2              ClrBit(TIM4_CR1, T4IP);
  34   2          }
  35   1          
  36   1          if(ReadBit(TIM4_CR1, T4IF))                             // 计数器溢出中断
  37   1          { 
  38   2              if(GP01 == 0)
  39   2              {
  40   3                  PWMCompare = 0;
  41   3                  PWMARR     = 8000;            
  42   3              }
  43   2              else
  44   2              {             
  45   3                  PWMCompare = 8000;
  46   3                  PWMARR     = 8000; 
  47   3              }
  48   2              ClrBit(TIM4_CR1, T4IF);
  49   2          }
  50   1      }


MODULE INFORMATION:   STATIC OVERLAYABLE
C51 COMPILER V9.52.0.0   INTERRUPT                                                         09/28/2018 15:04:30 PAGE 2   

   CODE SIZE        =     86    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =      4    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
   EDATA SIZE       =   ----    ----
   HDATA SIZE       =   ----    ----
   XDATA CONST SIZE =   ----    ----
   FAR CONST SIZE   =   ----    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)
