资源简介
TMS320F28335的CAN调试程序,很好的参考。
代码片段和文件信息
#include “DSP2833x_Device.h“ // DSP2833x Headerfile Include File
#include “DSP2833x_Examples.h“ // DSP2833x Examples Include File
// Prototype statements for functions found within this file.
void scib_echoback_init(void);
void scib_fifo_init(void);
void scib_xmit(int a);
void scib_msg(char *msg);
// Global counts used in this example
Uint16 LoopCount;
Uint16 ErrorCount;
void main(void)
{
Uint16 ReceivedChar;
char *msg;
// Step 1. Initialize System Control:
// PLL WatchDog enable Peripheral Clocks
// This example function is found in the DSP2833x_SysCtrl.c file.
InitSysCtrl();
// Step 2. Initalize GPIO:
// This example function is found in the DSP2833x_Gpio.c file and
// illustrates how to set the GPIO to it‘s default state.
// InitGpio(); Skipped for this example
// For this example only init the pins for the SCI-A port.
// This function is found in the DSP2833x_Sci.c file.
InitScibGpio();
InitXintf16Gpio();
// Step 3. Clear all interrupts and initialize PIE vector table:
// Disable CPU interrupts
DINT;
// Initialize PIE control registers to their default state.
// The default state is all PIE interrupts disabled and flags
// are cleared.
// This function is found in the DSP2833x_PieCtrl.c file.
InitPieCtrl();
// Disable CPU interrupts and clear all CPU interrupt flags:
IER = 0x0000;
IFR = 0x0000;
// Initialize the PIE vector table with pointers to the shell Interrupt
// Service Routines (ISR).
// This will populate the entire table even if the interrupt
// is not used in this example. This is useful for debug purposes.
// The shell ISR routines are found in DSP2833x_DefaultIsr.c.
// This function is found in DSP2833x_PieVect.c.
InitPieVectTable();
// Step 4. Initialize all the Device Peripherals:
// This function is found in DSP2833x_InitPeripherals.c
// InitPeripherals(); // Not required for this example
// Step 5. User specific code:
LoopCount = 0;
ErrorCount = 0;
scib_fifo_init(); // Initialize the SCI FIFO
scib_echoback_init(); // Initalize SCI for echoback
msg = “\r\n\n\nHello World!\0“;
scib_msg(msg);
msg = “\r\nYou will enter a character and the DSP will echo it back! \n\0“;
scib_msg(msg);
for(;;)
{
msg = “\r\nEnter a character: \0“;
scib_msg(msg);
// Wait for inc character
while(ScibRegs.SCIFFRX.bit.RXFFST !=1) { } // wait for XRDY =1 for empty state
// Get character
ReceivedChar = ScibRegs.SCIRXBUF.all;
// Echo character back
msg = “ You sent: \0“;
scib_msg(msg);
scib_xmit(ReceivedChar);
LoopCount++;
}
}
// Test 1SCIA DLB 8-bit word baud rate 0x000F default 1 STOP bit no parity
void scib_echoback_init()
{
// Note: Clocks were turned on to the SCIA peripheral
// in the InitSysCtrl() function
ScibRegs.SCICCR.all =0x0007; // 1
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3072 2008-03-19 13:10 CAN\CAN.CS_\FILE.CDX
文件 1568 2008-03-19 13:10 CAN\CAN.CS_\FILE.DBF
文件 2281 2008-03-19 13:10 CAN\CAN.CS_\FILE.FPT
文件 320512 2008-03-19 13:10 CAN\CAN.CS_\SYMBOL.CDX
文件 237647 2008-03-19 13:10 CAN\CAN.CS_\SYMBOL.DBF
文件 408894 2008-03-19 13:10 CAN\CAN.CS_\SYMBOL.FPT
目录 0 2009-07-09 10:03 CAN\CAN.CS_
文件 11048 2008-03-19 13:10 CAN\CAN.paf2
文件 1634 2008-03-19 13:10 CAN\CAN.pjt
文件 6553 2008-03-19 13:10 CAN\CAN.sbl
文件 3898 2008-03-19 13:10 CAN\cc_build_Debug.log
文件 3941 2008-03-19 13:10 CAN\CMD\28335_RAM_lnk.cmd
文件 8438 2008-03-19 13:10 CAN\CMD\DSP2833x_Headers_nonBIOS.cmd
目录 0 2009-07-09 10:03 CAN\CMD
文件 27441 2008-03-19 13:10 CAN\Debug\CAN.map
文件 165653 2008-03-19 13:10 CAN\Debug\CAN.out
文件 1112 2008-03-19 13:10 CAN\Debug\DSP2833x_ADC_cal.obj
文件 1391 2008-03-19 13:10 CAN\Debug\DSP2833x_CodeStartBranch.obj
文件 113759 2008-03-19 13:10 CAN\Debug\DSP2833x_CpuTimers.obj
文件 154384 2008-03-19 13:10 CAN\Debug\DSP2833x_DefaultIsr.obj
文件 117233 2008-03-19 13:10 CAN\Debug\DSP2833x_ECan.obj
文件 121824 2008-03-19 13:10 CAN\Debug\DSP2833x_GlobalVariableDefs.obj
文件 112547 2008-03-19 13:10 CAN\Debug\DSP2833x_PieCtrl.obj
文件 119446 2008-03-19 13:10 CAN\Debug\DSP2833x_PieVect.obj
文件 113409 2008-03-19 13:10 CAN\Debug\DSP2833x_Sci.obj
文件 112718 2008-03-19 13:10 CAN\Debug\DSP2833x_Spi.obj
文件 117528 2008-03-19 13:10 CAN\Debug\DSP2833x_SysCtrl.obj
文件 1123 2008-03-19 13:10 CAN\Debug\DSP2833x_usDelay.obj
文件 116361 2008-03-19 13:10 CAN\Debug\DSP2833x_Xintf.obj
文件 118957 2008-03-19 13:10 CAN\Debug\ECanBack2Back.obj
............此处省略53个文件信息
相关资源
- DSP28335程序片内FLASH搬运至RAM运行的
- UART转CAN或LIN的工具(Uart2any)和文档
- 28335写的用spi读取传感器数据并用CA
- wwwscan-很强大的后台扫描工具
- 基于DSP2812的以太网调试程序
- usb调试程序 对USB设备进行数据的读写
- CAN Linux驱动代码
- 矿用多功能网关通信接口设计
- pb9调用良田高拍仪例程scanctrl1.0
- 周立功PCI CAN卡LINUX驱动ubuntu16.04内核
- 基于S32K144的CANbootloader
- 基于ARM7处理器的CAN总线网络设计
- Can EC-MPS reduce gastrointestinal side effect
- 佳能时尚扫描仪CanoScan LiDE 500F
- CanoScan佳能4200f扫描仪驱动 v8.6.1.1a 官
- 佳能CanoScan 9000F扫描仪驱动 官方版
- 佳能canon lbp3000激光打印机驱动 for w
- STM32F103VCT6TR - High-density performance lin
- 基于MC68HC908GZ32的CAN-LIN网关设计
- 如何在CANVAS中使用D3.JS
- 基于CAN总线与ZigBee的瓦斯实时监测及
- Delphi XE10 Seattle移动开发指南完整版
- CiA-402-2-version-3.0.0
- ISO14229协议
- CAN和1939全套资料
- 亚信防毒墙Officescan卸载工具DelTrendR
- 新能源电动车快充2015年国标充电完整
- js canvas写的游戏 俄罗斯方块
- 基于CAN总线的智能照明系统的设计和
- 倍福通过NC方式控制第三方伺服步科配
评论
共有 条评论