This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DSP F28335 SCI通信问题

Other Parts Discussed in Thread: CONTROLSUITE

当置位SCICTL1寄存器中的SWRESET时,会将SCICTL2中的TXRDY位置位。
而TXRDY的说明文档中提到,TXRDY置位的时候,若中断使能TXINTENA=1,将会引发一个中断请求,我的SCIA初始化程序如下
void scia_init()
{
   SciaRegs.SCICCR.all =0x0007;   // 1 stop bit,  No loopback
                                  // No parity,8 char bits,
                                  // async mode, idle-line protocol
   SciaRegs.SCIHBAUD = 1;

   SciaRegs.SCILBAUD = 231;
   
   SciaRegs.SCICTL1.all =0x0003;  // enable TX, RX, internal SCICLK,
                                  // Disable RX ERR, SLEEP, TXWAKE
   //外设级中断使能
   SciaRegs.SCICTL2.bit.TXINTENA =1;     
   SciaRegs.SCICTL2.bit.RXBKINTENA =1;
   
   // Enable interrupts required for this example
   PieCtrlRegs.PIECTRL.bit.ENPIE = 1;   // Enable the PIE block
   PieCtrlRegs.PIEIER9.bit.INTx1=1;     // PIE Group 9, int1
   PieCtrlRegs.PIEIER9.bit.INTx2=1;     // PIE Group 9, INT2
   IER |= M_INT9;        // Enable CPU INT
   EINT; 
   SciaRegs.SCICTL1.bit.SWRESET=1;    // Relinquish SCI from Reset

}

但是我跟踪代码当 SciaRegs.SCICTL1.bit.SWRESET=1;执行后,并没有引发中断,这是为什么?
谢谢解答!

  • lingbin

    你是否是在发送的中断服务函数中设置断点,看芯片是否有停在断点处呢?

    从代码来看,应该需要进入中断。

    建议你查看相关寄存器位,如SCICTL1, SCICCR ,中断使能位等是否确实为初始化的值。

    也可用TI的例程测试一下:

    C:\ti\controlSUITE\device_support\f2833x\v133\DSP2833x_examples_ccsv4\scia_loopback_interrupts

x 出现错误。请重试或与管理员联系。