一个很简单程序,但不知道什么问题,每次都只收到qf,可正确的应该是qabcdef
#include "DSP28_Device.h"
unsigned char Sci_VarRx[]="abcdef";
unsigned char *p=Sci_VarRx;
unsigned int i=0,j;
unsigned int Send_Flag;
void main(void)
{
/*初始化系统*/
InitSysCtrl();
/*关中断*/
DINT;
IER = 0x0000;
IFR = 0x0000;
/*初始化PIE中断*/
InitPieCtrl();
/*初始化PIE中断矢量表*/
InitPieVectTable();
/*初始化SCIA寄存器*/
InitSci();
Send_Flag = 0;
// #if SCIA_INT
/*设置中断服务程序入口地址*/
EALLOW; // This is needed to write to EALLOW protected registers
PieVectTable.TXAINT = &SCITXINTA_ISR;
// PieVectTable.RXAINT = &SCIRXINTA_ISR;
EDIS; // This is needed to disable write to EALLOW protected registers
/*开中断*/
IER |= M_INT9;
// #endif
EINT; // Enable Global interrupt INTM
ERTM; // Enable Global realtime interrupt DBGM