//
// TMDX ALPHA RELEASE
// Intended for product evaluation purposes
//
//###########################################################################
//
// FILE: DSP28_SysCtrl.c
//
// TITLE: DSP28 Device System Control Initialization & Support Functions.
//
//###########################################################################
//
// Ver | dd mmm yyyy | Who | Description of changes
// =====|=============|======|===============================================
// 0.55| 06 May 2002 | L.H. | EzDSP Alpha Release
// 0.56| 20 May 2002 | L.H. | No change
// 0.57| 24 May 2002 | L.H. | Added initialization of RAM control registers
// | | | for TMX samples.
// 0.58| 29 Jun 2002 | L.H. | Added InitFlash function. Must be run from RAM
//###########################################################################
#include "DSP28_Device.h"
// Functions that will be run from RAM need to be assigned to
// a different section. This section will then be mapped using
// the linker cmd file.
#pragma CODE_SECTION(InitFlash, "ramfuncs");
//---------------------------------------------------------------------------
// InitSysCtrl:
//---------------------------------------------------------------------------
// This function initializes the System Control registers to a known state.
//
void InitSysCtrl(void)
{
Uint16 i;
EALLOW;
// On TMX samples, to get the best performance of on chip RAM blocks M0/M1/L0/L1/H0 internal
// control registers bit have to be enabled. The bits are in Device emulation registers.
DevEmuRegs.M0RAMDFT = 0x0300;
DevEmuRegs.M1RAMDFT = 0x0300;
DevEmuRegs.L0RAMDFT = 0x0300;
DevEmuRegs.L1RAMDFT = 0x0300;
DevEmuRegs.H0RAMDFT = 0x0300;
// Disable watchdog module
SysCtrlRegs.WDCR= 0x0068;
// Initalize PLL
SysCtrlRegs.PLLCR = 0xA;
// Wait for PLL to lock
for(i= 0; i< 5000; i++){}
// HISPCP/LOSPCP prescale register settings, normally it will be set to default values
SysCtrlRegs.HISPCP.all = 0x0001;
SysCtrlRegs.LOSPCP.all = 0x0002;
// Peripheral clock enables set for the selected peripherals.
SysCtrlRegs.PCLKCR.bit.EVAENCLK=1;
SysCtrlRegs.PCLKCR.bit.EVBENCLK=1;
SysCtrlRegs.PCLKCR.bit.SCIENCLKA=1;
SysCtrlRegs.PCLKCR.bit.SCIENCLKB=1;
SysCtrlRegs.PCLKCR.bit.MCBSPENCLK=1;
SysCtrlRegs.PCLKCR.bit.SPIENCLK=1;
SysCtrlRegs.PCLKCR.bit.ECANENCLK=1;
SysCtrlRegs.PCLKCR.bit.ADCENCLK=1;
EDIS;
}
// This function initializes the Flash Control registers
// CAUTION
// This function MUST be executed out of RAM. Executing it
// out of OTP/Flash will yield unpredictable results
void InitFlash(void)
{
EALLOW;
//Enable Flash Pipeline mode to improve performance
//of code executed from Flash.
FlashRegs.FOPT.bit.ENPIPE = 1;
// CAUTION
//Minimum waitstates required for the flash operating
//at a given CPU rate must be characterized by TI.
//Refer to the datasheet for the latest information.
//Set the Random Waitstate for the Flash
FlashRegs.FBANKWAIT.bit.RANDWAIT = 5;
//Set the Paged Waitstate for the Flash
FlashRegs.FBANKWAIT.bit.PAGEWAIT = 5;
// CAUTION
//Minimum cycles required to move between power states
//at a given CPU rate must be characterized by TI.
//Refer to the datasheet for the latest information.
//For now use the default count
//Set number of cycles to transition from sleep to standby
FlashRegs.FSTDBYWAIT.bit.STDBYWAIT = 0x01FF;
//Set number of cycles to transition from standby to active
FlashRegs.FACTIVEWAIT.bit.ACTIVEWAIT = 0x01FF;
EDIS;
}
//---------------------------------------------------------------------------
// KickDog:
//---------------------------------------------------------------------------
// This function resets the watchdog timer.
// Enable this function for using KickDog in the application
/*
void KickDog(void)
{
EALLOW;
SysCtrlRegs.WDKEY = 0x0055;
SysCtrlRegs.WDKEY = 0x00AA;
EDIS;
}
*/
//===========================================================================
// No more.
//===========================================================================
没有合适的资源?快使用搜索试试~ 我知道了~
add1(8-1).rar_scia
共39个文件
h:18个
obj:3个
c:3个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 54 浏览量
2022-09-21
07:44:58
上传
评论
收藏 270KB RAR 举报
温馨提示
本实验对SCI进行简单的数据收发,通过RS232串口与PC通信,SCIA将接收到的数据每字节加1立即回送。
资源推荐
资源详情
资源评论
收起资源包目录
add1(8-1).rar (39个子文件)
add1(8-1)
DSP28_ECan.h 46KB
DSP28_GlobalPrototypes.h 1KB
DSP28_Xintf.h 4KB
DSP28_SysCtrl.h 10KB
DSP28_CpuTimers.h 6KB
rts2800.lib 166KB
DSP28_Adc.h 7KB
DSP28_SysCtrl.c 4KB
DSP28_Gpio.h 29KB
DSP28_Ev.h 21KB
Debug.lkf 521B
EzDSP_RAM_lnk.cmd 6KB
DSP28_Device.h 4KB
add1(8-1).paf2 4KB
DSP28_Mcbsp.h 34KB
DSP28_PieCtrl.h 6KB
DSP28_XIntrupt.h 2KB
DSP28_Spi.h 6KB
add1(8-1).sbl 4KB
DSP28_SWPrioritizedIsrLevels.h 143KB
DSP28_DevEmu.h 2KB
add1(8-1).pjt 879B
add1(8-1).CS_
SYMBOL.DBF 326KB
FILE.CDX 3KB
FILE.FPT 1KB
FILE.DBF 998B
SYMBOL.FPT 515KB
SYMBOL.CDX 407KB
DSP28_GlobalVariableDefs.c 4KB
DSP28_Sci.h 8KB
DSP28_PieVect.h 6KB
Debug
8.1 add1.obj 15KB
add1(8-1).map 10KB
DSP28_GlobalVariableDefs.obj 109KB
add1(8-1).out 93KB
DSP28_SysCtrl.obj 8KB
DSP28_DefaultIsr.h 5KB
8.1 add1.C 1KB
cc_build_Debug.log 134B
共 39 条
- 1
资源评论
APei
- 粉丝: 63
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功