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

📄 qtimer_3.c

📁 菲斯卡尔无传感器无刷控制方案。具体说明文档和程序都在压缩包内。
💻 C
字号:
/** ###################################################################
**     THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
**     Filename  : QTIMER_3.C
**     Project   : bldc_zc_8013
**     Processor : 56F8013VFAE
**     Beantype  : Init_TMR
**     Version   : Bean 01.100, Driver 01.15, CPU db: 2.87.068
**     Compiler  : Metrowerks DSP C Compiler
**     Date/Time : 23.5.2005, 11:21
**     Abstract  :
**         This "Init_TMR" Peripheral Inspector implements the
**         Quad Timer module (TMR), basic initialization
**         and settings.
**     Settings  :
**         Timer counter device        : TMR3
**
**         Operation mode              : Triggered count mode
**         Count once                  : count repeatedly
**         Count length                : count till compare, then reinitialize
**         Count direction             : down
**         Master mode                 : Disabled
**         External OFLAG force        : Disabled
**         Forced OFLAG value          : Disabled
**         Force OFLAG ouput           : Disabled
**         Output enable               : no
**         Output polarity             : true
**         Input  polarity             : true
**         Co-channel init.            : Disabled
**
**         Primary source              : prescaler (IP BUS clock)
**         Secondary source            : counter 3 input pin
**
**         Input capture mode          : Disabled
**
**         Output mode                 : set on compare, cleared on secondary source input edge
**
**         Compare load control 1      : Disabled
**         Compare load control 2      : Disabled
**
**         Debug mode action           : Normal operation
**
**         Interrupts
**             Timer compare           : Disabled
**             Timer overflow          : Disabled
**             Input edge              : Disabled
**             Timer compare 1         : Disabled
**             Timer compare 2         : Disabled
**     Contents  :
**         Init - void QTIMER_3_Init(void);
**
**     (c) Copyright UNIS, spol. s r.o. 1997-2004
**     UNIS, spol. s r.o.
**     Jundrovska 33
**     624 00 Brno
**     Czech Republic
**     http      : www.processorexpert.com
**     mail      : info@processorexpert.com
** ###################################################################*/

/* MODULE QTIMER_3. */

#include "QTIMER_3.h"

/*
** ===================================================================
**     Method      :  QTIMER_3_Init (bean Init_TMR)
**
**     Description :
**         This method initializes registers of the TMR module
**         according to this Peripheral Initialization Bean settings.
**         Call this method in the user code to initialize the
**         module. By default, the method is called by PE
**         automatically; see "Call Init method" property of the
**         bean for more details.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
void QTIMER_3_Init(void)
{
  setReg16(TMR3_CMP1,C_QTIMER_3_reg_TMR3_CMP1); /* Set the Compare register 1 */ 
  setReg16(TMR3_CMP2,C_QTIMER_3_reg_TMR3_CMP2); /* Set the Compare register 2 */ 
  setReg16(TMR3_LOAD,C_QTIMER_3_reg_TMR3_LOAD); /* Set the Load register */ 
  setReg16(TMR3_CNTR,C_QTIMER_3_reg_TMR3_CNTR); /* Set the Counter register */ 
  /* TMR3_SCR: TCF=0,TCFIE=0,TOF=0,TOFIE=0,IEF=0,IEFIE=0,IPS=0,INPUT=0,Capture_Mode=0,MSTR=0,EEOF=0,VAL=0,FORCE=0,OPS=0,OEN=0 */
  setReg16(TMR3_SCR,C_QTIMER_3_reg_TMR3_SCR); /* Set the Status and control register */ 
  /* TMR3_CMPLD1: COMPARATOR_LOAD_1=0 */
  setReg16(TMR3_CMPLD1,C_QTIMER_3_reg_TMR3_CMPLD1); /* Set the Comparator load register 1 */ 
  /* TMR3_CMPLD2: COMPARATOR_LOAD_2=0 */
  setReg16(TMR3_CMPLD2,C_QTIMER_3_reg_TMR3_CMPLD2); /* Set the Comparator load register 2 */ 
  /* TMR3_COMSCR: DBG_EN=0,??=0,??=0,??=0,??=0,??=0,??=0,TCF2EN=0,TCF1EN=0,TCF2=0,TCF1=0,CL2=0,CL1=0 */
  setReg16(TMR3_COMSCR,C_QTIMER_3_reg_TMR3_COMSCR); /* Set the Comparator status/control register */ 
  /* TMR3_CTRL: CM=6,PCS=8,SCS=3,ONCE=0,LENGTH=1,DIR=1,Co_INIT=0,OM=5 */
  setReg16(TMR3_CTRL,C_QTIMER_3_reg_TMR3_CTRL); /* Set the Control register */ 
}

/* END QTIMER_3. */

/*
** ###################################################################
**
**     This file was created by UNIS Processor Expert 2.96 [03.65]
**     for the Freescale 56800 series of microcontrollers.
**
** ###################################################################
*/

⌨️ 快捷键说明

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