资源简介
TI DSP 28335 串口FIFO中断接收程序
打开后在工程添加文件中的comm_2int_fifo.c文件即可。
该文件已经本人调试成功可用。

代码片段和文件信息
#include “DSP28x_Project.h“ // Device Headerfile and Examples Include Fil
#define LED10_OFF GpioDataRegs.GPASET.bit.GPIO0 = 1 //LED D10 熄灭
#define LED10_ON GpioDataRegs.GPACLEAR.bit.GPIO0 = 1 //LED D10 点亮
#define LED11_OFF GpioDataRegs.GPASET.bit.GPIO1 = 1 //LED D11 熄灭
#define LED11_ON GpioDataRegs.GPACLEAR.bit.GPIO1 = 1 //LED D11 点亮
#define DELAY_TIME 2000000 //延时时间
// Prototype statements for functions found within this file.
interrupt void scibRxFifoIsr(void);
interrupt void scicRxFifoIsr(void);
void scib_fifo_init(void);
void scic_fifo_init(void);
void delay(Uint32 t);
// Global variables
Uint16 rdataB[12]; // Received data for SCI-A
Uint16 rdataC[12];
void main(void)
{
Uint16 i;
InitSysCtrl();
InitSciGpio();
DINT;
InitPieCtrl();
IER = 0x0000;
IFR = 0x0000;
InitPieVectTable();
EALLOW; // This is needed to write to EALLOW protected registers
PieVectTable.SCIRXINTB = &scibRxFifoIsr;
PieVectTable.SCIRXINTC = &scicRxFifoIsr;
EDIS; // This is needed to disable write to EALLOW protected registers
scib_fifo_init(); // Init SCI-B
scic_fifo_init(); // Init SCI-B
// Enable interrupts required for this example
PieCtrlRegs.PIECTRL.bit.ENPIE = 1; // Enable the PIE block
PieCtrlRegs.PIEIER8.bit.INTx5 = 1; //for scirxintc
PieCtrlRegs.PIEIER9.bit.INTx3=1; // PIE Group 9 INT3 for scirxintb
IER = 0x180; // Enable CPU INT
EINT;
//初始化LED的端口
EALLOW;
GpioCtrlRegs.GPAPUD.bit.GPIO0 = 0; // Enable pullup on GPIO11
GpioDataRegs.GPASET.bit.GPIO0 = 1; // Load output latch
GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 0; // GPIO11 = GPIO
GpioCtrlRegs.GPADIR.bit.GPIO0 = 1; // GPIO11 = output
GpioCtrlRegs.GPAPUD.bit.GPIO1 = 0; // Enable pullup on GPIO11
GpioDataRegs.GPASET.bit.GPIO1 = 1; // Load output latch
GpioCtrlRegs.GPAMUX1.bit.GPIO1 = 0; // GPIO11 = GPIO
GpioCtrlRegs.GPADIR.bit.GPIO1 = 1; // GPIO11 = output
EDIS;
LED10_ON; //LED1 D10 点亮
delay(DELAY_TIME); //延时
LED10_OFF; //LED1 D10 熄灭
LED11_ON; //LED1 D10 点亮
delay(DELAY_TIME); //延时
LED11_OFF;
// Step 6. IDLE loop. Just sit and loop forever (optional):
for(;;);
}
interrupt void scibRxFifoIsr(void)
{
Uint16 i;
LED10_ON; //LED1 D10 点亮
delay(DELAY_TIME); //延时
LED10_OFF; //LED1 D10 熄灭
for(i=0;i<12;i++)
{
rdataB[i]=ScibRegs.SCIRXBUF.all; // Read data
}
ScibRegs.SCIFFRX.bit.RXFFOVRCLR=1; // Clear Overflow flag
ScibRegs.SCIFFRX.bit.RXFFINTCLR=1; // Clear Interrupt flag
PieCtrlRegs.PIEACK.all|=0x100; // Issue PIE ack
}
void scib_fifo_init()
{
ScibRegs.SCICCR.all =0x0007; // 1 stop bit No loopback
// No parity8 char bits
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-11-29 09:53 comm\
文件 3976 2015-11-28 22:54 comm\cc_build_Debug.log
目录 0 2015-11-29 09:53 comm\comm.CS_\
文件 3072 2015-11-29 09:52 comm\comm.CS_\FILE.CDX
文件 1530 2015-11-29 09:52 comm\comm.CS_\FILE.DBF
文件 2786 2015-11-29 09:52 comm\comm.CS_\FILE.FPT
文件 324096 2015-11-29 09:52 comm\comm.CS_\SYMBOL.CDX
文件 239594 2015-11-29 09:52 comm\comm.CS_\SYMBOL.DBF
文件 412456 2015-11-29 09:52 comm\comm.CS_\SYMBOL.FPT
文件 10382 2015-11-28 22:58 comm\comm.paf2
文件 1994 2015-11-28 22:58 comm\comm.pjt
文件 8859 2015-11-28 22:58 comm\comm.sbl
文件 5021 2015-11-28 22:54 comm\comm_2int_fifo.c
目录 0 2015-11-29 09:53 comm\Debug\
文件 1200 2015-11-28 22:54 comm\Debug.lkf
文件 133641 2015-11-28 10:21 comm\Debug\5110.obj
文件 126348 2015-11-28 10:21 comm\Debug\5110main.obj
文件 26036 2015-11-28 22:54 comm\Debug\comm.map
文件 132870 2015-11-16 11:03 comm\Debug\comm.obj
文件 162813 2015-11-28 22:54 comm\Debug\comm.out
文件 131070 2015-11-28 19:09 comm\Debug\comm_2int_bytes.obj
文件 130861 2015-11-28 22:54 comm\Debug\comm_2int_fifo.obj
文件 132847 2015-11-17 19:37 comm\Debug\comm_int.obj
文件 134541 2015-11-25 10:25 comm\Debug\comm_int_bytes.obj
文件 1260 2015-11-28 22:54 comm\Debug\DSP2833x_ADC_cal.obj
文件 1537 2015-11-28 22:54 comm\Debug\DSP2833x_CodeStartBranch.obj
文件 167157 2015-11-28 22:54 comm\Debug\DSP2833x_DefaultIsr.obj
文件 135268 2015-11-28 22:54 comm\Debug\DSP2833x_GlobalVariableDefs.obj
文件 125447 2015-11-28 22:54 comm\Debug\DSP2833x_PieCtrl.obj
文件 132648 2015-11-28 22:54 comm\Debug\DSP2833x_PieVect.obj
文件 126387 2015-11-28 22:54 comm\Debug\DSP2833x_Sci.obj
............此处省略3个文件信息
相关资源
- PcShutDownByTime.zip
- A Sequential Bundle Method for Solving a MPEC
- the_definitive_guide_to_linux_network_programm
- DSP实验(10次实验有详细步骤)
- Theoretical study of the interaction between C
- Assembly Language for x86 Processors (7th Ed
- The IDA Pro Book 2nd Edition
- LS-DYNA THEORETICAL MANUAL
- 《THE ONE-PAGE PROJECT MANAGER FOR EXECUTION(
- ANSYS 14.5 Design Exploration User Guide
- 微信、QQ、TIM、QQ轻聊版防撤回软件(
- VMware Workstation Pro 15 注册机
- Altium Designer 14 中文详细教程
- Altium Designer dblib简易制作教程
- 如何在 Altium Designer 中快速进行差分对
- CATIA汽车曲面综合设计
- Numerical Optimization 2ed-Nocedal
- MODERN ROBOTICS MECHANICS PLANNING AND CONTROL
- Azure开发教程:Azure_Serverless_Computing
- 实验三 消息中间件应用开发:Active
- AsyncTask文件控制暂停和继续,在状态
- SpringBoot+H2+mybatis-plus59130
- Rational Rose Common破解文件
- umeshmotion网格推移
- Wolfram Mathematica 矩阵初等变换函数(
- 基本放大电路multisim仿真.ms14
-
Actionsc
ript 1.0实现能跟随鼠标运动的 - F28335无刷直流电机开闭环控制
- CCS5.05.1可使用的license
- TI CCS V5.4 安装步骤及破解文件
评论
共有 条评论