• 大小: 325KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-13
  • 语言: 其他
  • 标签: DSP28335  sci  rs485  

资源简介

用28335实现SCI通信,用485传输,使用了max485芯片,这个程序是最简单的参考程序。

资源截图

代码片段和文件信息

// TI File $Revision: /main/3 $
// Checkin $Date: March 16 2007   08:37:30 $
//###########################################################################
//
// FILE: DSP2833x_CpuTimers.c
//
// title: CPU 32-bit Timers Initialization & Support Functions.
//
// NOTES:   CpuTimer1 and CpuTimer2 are reserved for use with DSP BIOS and
//          other realtime operating systems.
//
//          Do not use these two timers in your application if you ever plan
//          on integrating DSP-BIOS or another realtime OS.
//
//
//###########################################################################
// $TI Release: DSP2833x Header Files V1.01 $
// $Release Date: September 26 2007 $
//###########################################################################

#include “DSP2833x_Device.h“     // Headerfile Include File
#include “DSP2833x_Examples.h“   // Examples Include File

struct CPUTIMER_VARS CpuTimer0;

// CpuTimer 1 and CpuTimer2 are used by DSP BIOS & other RTOS. Comment out if using DSP BIOS or other RTOS.
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;


// CpuTimer 1 and CpuTimer2 are reserved for DSP BIOS & other RTOS
// Do not use these two timers if you ever plan on integrating
// DSP-BIOS or another realtime OS.
//
// 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:
//-------------

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        329  2019-05-27 20:45  SCI\.ccsproject

     文件      16289  2014-07-11 17:09  SCI\.cdtbuild

     文件      16289  2019-05-27 20:45  SCI\.cdtbuild_initial

     文件        553  2014-07-11 16:10  SCI\.cdtproject

     文件      28283  2019-05-27 20:45  SCI\.cproject

     文件       4476  2019-05-29 16:45  SCI\.launches\SCI.launch

     文件        833  2019-05-27 20:45  SCI\.project

     文件        583  2019-05-27 20:45  SCI\.project_initial

     文件         62  2019-05-27 20:45  SCI\.settings\org.eclipse.cdt.codan.core.prefs

     文件        123  2019-05-27 20:45  SCI\.settings\org.eclipse.cdt.debug.core.prefs

     文件        607  2019-05-27 20:45  SCI\.settings\org.eclipse.cdt.managedbuilder.core.prefs

     文件        301  2019-05-27 20:45  SCI\.settings\org.eclipse.core.resources.prefs

     文件        512  2011-01-11 17:38  SCI\cc_build_Debug.log

     文件       3941  2007-12-31 15:02  SCI\CMD\28335_RAM_lnk.cmd

     文件       8438  2007-09-21 11:09  SCI\CMD\DSP2833x_Headers_nonBIOS.cmd

     文件        413  2019-05-29 16:45  SCI\Debug\ccsObjs.opt

     文件          0  2014-07-11 17:09  SCI\Debug\CMD\ccsSrcs.opt

     文件       1824  2014-07-11 17:09  SCI\Debug\CMD\subdir.mk

     文件       1587  2019-05-29 15:56  SCI\Debug\CMD\subdir_rules.mk

     文件        373  2019-05-29 15:56  SCI\Debug\CMD\subdir_vars.mk

     文件       1267  2019-05-27 20:45  SCI\Debug\DSP2833x_ADC_cal.obj

     文件       1551  2019-05-27 20:45  SCI\Debug\DSP2833x_CodeStartBranch.obj

     文件       5856  2019-05-27 20:45  SCI\Debug\DSP2833x_CpuTimers.obj

     文件      29427  2019-05-27 20:45  SCI\Debug\DSP2833x_DefaultIsr.obj

     文件     121429  2019-05-27 20:46  SCI\Debug\DSP2833x_GlobalVariableDefs.obj

     文件       5811  2019-05-27 20:46  SCI\Debug\DSP2833x_PieCtrl.obj

     文件      17757  2019-05-27 20:46  SCI\Debug\DSP2833x_PieVect.obj

     文件      12996  2019-05-27 22:03  SCI\Debug\DSP2833x_Sci.obj

     文件      12242  2019-05-27 20:46  SCI\Debug\DSP2833x_Spi.obj

     文件      15985  2019-05-27 20:46  SCI\Debug\DSP2833x_SysCtrl.obj

............此处省略89个文件信息

评论

共有 条评论