资源简介
md380_C_org_q.zip
代码片段和文件信息
// TI File $Revision: /main/2 $
// Checkin $Date: 10:51:51 $
//###########################################################################
//
// FILE: DSP2803x_CpuTimers.c
//
// title: CPU 32-bit Timers Initialization & Support Functions.
//
// NOTES:
//
//###########################################################################
// $TI Release: 2803x C/C++ Header Files V1.21 $
// $Release Date: December
//###########################################################################
#include “DSP2803x_Device.h“ // Headerfile Include File
#include “DSP2803x_Examples.h“ // Examples Include File
struct CPUTIMER_VARS CpuTimer0;
struct CPUTIMER_VARS CpuTimer1;
struct CPUTIMER_VARS CpuTimer2;
//---------------------------------------------------------------------------
// InitCpuTimers:
//---------------------------------------------------------------------------
// This function initializes all three CPU timers to a known state.
//
void InitCpuTimers(void)
{
// CPU Timer 0
// Initialize address pointers to respective timer registers:
CpuTimer0.RegsAddr = &CpuTimer0Regs;
// Initialize timer period to maximum:
CpuTimer0Regs.PRD.all = 0xFFFFFFFF;
// Initialize pre-scale counter to divide by 1 (SYSCLKOUT):
CpuTimer0Regs.TPR.all = 0;
CpuTimer0Regs.TPRH.all = 0;
// Make sure timer is stopped:
CpuTimer0Regs.TCR.bit.TSS = 1;
// Reload all counter register with period value:
CpuTimer0Regs.TCR.bit.TRB = 1;
// Reset interrupt counters:
CpuTimer0.InterruptCount = 0;
// Initialize address pointers to respective timer registers:
CpuTimer1.RegsAddr = &CpuTimer1Regs;
CpuTimer2.RegsAddr = &CpuTimer2Regs;
// Initialize timer period to maximum:
CpuTimer1Regs.PRD.all = 0xFFFFFFFF;
CpuTimer2Regs.PRD.all = 0xFFFFFFFF;
// Initialize pre-scale counter to divide by 1 (SYSCLKOUT):
CpuTimer1Regs.TPR.all = 0;
CpuTimer1Regs.TPRH.all = 0;
CpuTimer2Regs.TPR.all = 0;
CpuTimer2Regs.TPRH.all = 0;
// Make sure timers are stopped:
CpuTimer1Regs.TCR.bit.TSS = 1;
CpuTimer2Regs.TCR.bit.TSS = 1;
// Reload all counter register with period value:
CpuTimer1Regs.TCR.bit.TRB = 1;
CpuTimer2Regs.TCR.bit.TRB = 1;
// Reset interrupt counters:
CpuTimer1.InterruptCount = 0;
CpuTimer2.InterruptCount = 0;
}
//---------------------------------------------------------------------------
// ConfigCpuTimer:
//---------------------------------------------------------------------------
// This function initializes the selected timer to the period specified
// by the “Freq“ and “Period“ parameters. The “Freq“ is entered as “MHz“
// and the period in “uSeconds“. The timer is held in the stopped state
// after configuration.
//
void ConfigCpuTimer(struct CPUTIMER_VARS *Timer float Freq float Period)
{
Uint32 temp;
// Initialize timer period:
Timer->CPUFreqInMHz = Freq;
Timer->PeriodInUSec = Period;
temp = (long) (Freq * Period);
Timer->RegsAddr->PRD.all = te
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-12-15 20:42 md380_C_org_q\
目录 0 2017-04-17 23:46 md380_C_org_q\SourceInsight\
文件 6656000 2016-10-22 15:35 md380_C_org_q\SourceInsight\qgw.IAB
文件 65328 2016-10-22 15:57 md380_C_org_q\SourceInsight\qgw.IAD
文件 1843200 2016-10-22 15:35 md380_C_org_q\SourceInsight\qgw.IMB
文件 18328 2016-10-22 15:57 md380_C_org_q\SourceInsight\qgw.IMD
文件 740 2017-04-17 23:47 md380_C_org_q\SourceInsight\qgw.PFI
文件 776 2017-04-17 23:47 md380_C_org_q\SourceInsight\qgw.PO
文件 58232 2017-04-17 23:45 md380_C_org_q\SourceInsight\qgw.PR
文件 374952 2017-04-17 23:47 md380_C_org_q\SourceInsight\qgw.PRI
文件 3314092 2017-04-17 23:47 md380_C_org_q\SourceInsight\qgw.PS
文件 1051 2017-04-17 23:45 md380_C_org_q\SourceInsight\qgw.SearchResults
文件 13817 2017-04-17 23:47 md380_C_org_q\SourceInsight\qgw.WK3
目录 0 2016-12-15 20:41 md380_C_org_q\md380_C_org\
目录 0 2016-12-15 20:41 md380_C_org_q\md380_C_org\CCs\
目录 0 2016-12-15 20:41 md380_C_org_q\md380_C_org\CCs\Debug\
文件 99006 2015-12-16 13:27 md380_C_org_q\md380_C_org\CCs\Debug\md380_C.map
文件 693332 2015-12-16 13:27 md380_C_org_q\md380_C_org\CCs\Debug\md380_C.out
文件 3414 2015-12-16 13:27 md380_C_org_q\md380_C_org\CCs\Debug.lkf
目录 0 2016-12-15 20:41 md380_C_org_q\md380_C_org\CCs\Release\
文件 1713 2013-01-09 21:15 md380_C_org_q\md380_C_org\CCs\Release\ASMSubPrg.obj
文件 858 2013-01-09 21:15 md380_C_org_q\md380_C_org\CCs\Release\DSP2803x_CSMPasswords.obj
文件 1646 2013-01-09 21:15 md380_C_org_q\md380_C_org\CCs\Release\DSP2803x_CodeStartBranch.obj
文件 5829 2013-01-09 21:14 md380_C_org_q\md380_C_org\CCs\Release\DSP2803x_CpuTimers.obj
文件 134448 2013-01-09 21:14 md380_C_org_q\md380_C_org\CCs\Release\DSP2803x_GlobalVariableDefs.obj
文件 1272 2013-01-09 21:14 md380_C_org_q\md380_C_org\CCs\Release\DSP2803x_usDelay.obj
文件 99338 2013-01-09 21:17 md380_C_org_q\md380_C_org\CCs\Release\MD380_Release.map
文件 580291 2013-01-09 21:17 md380_C_org_q\md380_C_org\CCs\Release\MD380_Release_20130110_Chint.out
文件 29205 2013-01-09 21:14 md380_C_org_q\md380_C_org\CCs\Release\MotorCarrier.obj
文件 7474 2013-01-09 21:15 md380_C_org_q\md380_C_org\CCs\Release\MotorConstant.obj
文件 7146 2013-01-09 21:15 md380_C_org_q\md380_C_org\CCs\Release\MotorCurrentTransform.obj
............此处省略334个文件信息
相关资源
- Hibernate4.1.1中文文档.rar
- IEC61850Server.zip
- TheGreenBowIPSecVPNClient5.55ANDKeyGen.zip
- 免费GOOGLE瓦片器.zip
- LearningFromData_Ashortcourse-YaserS.Abu-Mosta
- bc9725a79f4eb4b343d24491a9c41aa9.zip
- snif.rar
- Splunk实践指南.pdf
- Electromagnetic_parameter_measurement.zip
- Excel王佩丰视频教程课件打包.zip
- 统计学习方法.azw3
- ytu_26860.zip
- .rar35813
- ocProject.rar
- openmv-boards-master.zip
- halazi100_7695403.zip
- rar(28)
- S7-1500_CAD.rar34743
- OperatingSystems_ThreeEasyPieces.pdf
- Picc18.rar
- 20161013182312144.pdf
- unix.v6.v7.src.rar
- 12-04.rar
- GPS_INS组合导航定位及其应用.pdf
- 牛奶配送管理系统5.0正式注册版.rar
- V6.1破解版.rar
- cpp-empty-test.zip
- 15x40j.rar
- ZeuS2.0.8.9.7z
- OperatingSystems.pdf
评论
共有 条评论