Hello,
I think I am misunderstanding how the RX FIFO on the Scia is meant to work.
I am letting the FIFO fill, and then reading the buffer when it has 2 or more characters:
if (SciaRegs.SCIFFRX.bit.RXFFST >=2)
{
while(SciaRegs.SCIFFRX.bit.RXFFST !=0)
{
SciaRegs.SCITXBUF =(SciaRegs.SCIRXBUF.bit.RXDT &0x00FF); /*echo to TX for test*/
}
}
But I am only getting 1 character written to the TX buffer. Using the debugger, SciaRegs.SCIFFRX.bit.RXFFST changes to 0 as soon as I read SciaRegs.SCIRXBUF.bit.RXDT.
Notes:
-If I enable and disable the FIFO, I can see that SciaRegs.SCIRXST.bit.RXRDY will change to 1 when the FIFO is disabled and stays at 0 when FIFO is enabled.
-Looking over the memory in the debugger and the data sheet, I cannot see where the FIFO buffer memory is for more than a single element.
Questions:
-Am I reading the FIFO correctly by reading the SciaRegs.SCIRXBUF.bit.RXDT or should I be reading a different register?
-Is there a way to see what characters are in the FIFO with the debugger by finding a specific set of memory addresses?
-When the FIFO is overrun, is the first element in dropped as the last element shifts in, or is the last element overwritten? If this is listed in SPRUGH1C, I don't think I understood it.