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.

LAUNCHXL-F28027: SCI Interrupt SCIRXINTA, values not updating

Part Number: LAUNCHXL-F28027

I have considered scia_loopback_interrupts example. I have disabled loop back. SCI transmit interrupt is working. But when i try to receive data, I am receiving the previous value. For example if i send 25 it will not be updated. But when i send a second value 34, i am receiving 25 (the previous value). And the pattern continues. Kindly please help to solve the issue.        

  • Georgy,

    Could you please let me know if you are using the 'driver' or 'structs' version of the example?  If using the 'driver' version, please comment out the following line in "sciaRxFifoIsr" and let me know if this solves the issue:

    if(SCI_getRxFifoStatus(mySci) != SCI_FifoLevel_Empty)

    Next, if you are using the 'driver' version, please try the 'structs' version and let me know if this works for you.  The 'driver' version is in the process of being deprecated.

    I hope this helps. If this answers your question, please click the green "Verified Answer" button. Thanks.

    - Ken

  • I am using the structs version. My receive interrupt and sci initialization function is as below.

    __interrupt void sciaRxFifoIsr(void)
    {           rData=SciaRegs.SCIRXBUF.all; // Read data

    SciaRegs.SCIFFRX.bit.RXFFOVRCLR=1; // Clear Overflow flag
    SciaRegs.SCIFFRX.bit.RXFFINTCLR=1; // Clear Interrupt flag

    PieCtrlRegs.PIEACK.all|=0x100; // Issue PIE ack     }

    void scia_fifo_init()
    {
    SciaRegs.SCICCR.all =0x0007; // 1 stop bit, No loopback // No parity,8 char bits, // async mode, idle-line protocol
    SciaRegs.SCICTL1.all =0x0003; // enable TX, RX, internal SCICLK, // Disable RX ERR, SLEEP, TXWAKE
    SciaRegs.SCICTL2.bit.TXINTENA =1;
    SciaRegs.SCICTL2.bit.RXBKINTENA =1;
    SciaRegs.SCIHBAUD = 0x0000;      // 9600 baud @LSPCLK = 15MHz (60 MHz SYSCLK).
    SciaRegs.SCILBAUD = =0x00C2;
    SciaRegs.SCICCR.bit.LOOPBKENA =0; // Disable loop back
    SciaRegs.SCIFFTX.all=0xC022;
    SciaRegs.SCIFFRX.all=0x0022;
    SciaRegs.SCIFFCT.all=0x00;

    SciaRegs.SCICTL1.all =0x0023; // Relinquish SCI from Reset
    SciaRegs.SCIFFTX.bit.TXFIFOXRESET=1;
    SciaRegs.SCIFFRX.bit.RXFIFORESET=1;
    }

  • Georgy,

    From your code above, it looks like you are trying to receive a single value, but your FIFO is set to 2.  Try changing your FIFO setting to match (SCIFFRX).

    I hope this helps. If this answers your question, please click the green "Verified Answer" button. Thanks.

    -Ken