28335 SCI写TXBUF但寄存器里的值没变化

2019-07-19 16:21发布

通过while循环不断对SCITXBUF写数据 那么我观察寄存器里的值应该是不断变化的 但是实际运行时寄存器内的值无变化 PC端接受不到数据
#include "DSP28x_Project.h"     // Device Headerfile and Examples Include File

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();

// 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();
   ScibRegs.SCICCR.bit.STOPBITS=0;
   ScibRegs.SCICCR.bit.PARITYENA=0;
   ScibRegs.SCICCR.bit.SCICHAR=7;
   ScibRegs.SCICTL1.bit.RXENA=1;
   ScibRegs.SCICTL1.bit.TXENA=1;
   ScibRegs.SCIHBAUD=0X0001;
   ScibRegs.SCILBAUD=0X00E7;
   ScibRegs.SCICTL1.bit.TXWAKE=1;
   ScibRegs.SCICTL1.bit.SWRESET=1;
   ScibRegs.SCITXBUF = 0x2;
   while(1)
           {DELAY_US(200);
            ScibRegs.SCITXBUF=0x5;
            DELAY_US(200);
            ScibRegs.SCITXBUF=0x2;
            DELAY_US(200);
                ScibRegs.SCITXBUF=0x3;
           }
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。