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.
Hi,
I can see the data get updated on SCIRXEMU but it never get updated on SCIRXBUF.
This is how I set my fifo:
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; SciaRegs.SCILBAUD =0x0006; SciaRegs.SCICCR.bit.LOOPBKENA = 0; // Enable loop back SciaRegs.SCIFFTX.all=0xC028; SciaRegs.SCIFFRX.all=0x0021; SciaRegs.SCIFFCT.all=0x00; SciaRegs.SCICTL1.all =0x0023; // Relinquish SCI from Reset SciaRegs.SCIFFTX.bit.TXFIFOXRESET = 1; SciaRegs.SCIFFRX.bit.RXFIFORESET=1; }
And this is the interrupt:
interrupt void sciaRxFifoIsr(void) { while(SciaRegs.SCIFFRX.bit.RXFIFST) rdataA=SciaRegs.SCIRXBUF.all; // Read data if(rdataA=='A') { GpioDataRegs.GPBDAT.all = 0x0000; // Delay_1ms(1000); } SciaRegs.SCIFFRX.bit.RXFIFORESET = 0; SciaRegs.SCIFFRX.bit.RXFIFORESET = 1; SciaRegs.SCIFFRX.bit.RXFFOVRCLR=1; // Clear Overflow flag SciaRegs.SCIFFRX.bit.RXFFINTCLR=1; // Clear Interrupt flag PieCtrlRegs.PIEACK.all |= 0x100; // Issue PIE ack }
Any help will be greatly appreciated, thank you