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.

TM4C1294NCZAD: EPI HB16 FIFO Cannot Write while Read Started

Part Number: TM4C1294NCZAD

We are using the EPI in HB16 FIFO mode to read/write data from/to a FIFO implemented in FPGA.

We have the read hooked up to the DMA in ping-pong buffer mode.  As soon as one read is done, we start another read with the other buffer using the function EPINonBlockingReadStart.

This all works fine except that it blocks us from writing while a read is in progress.  Meaning that even if the Read FIFO is empty, and there's no read activity, the peripheral still refuses to send data out (the internal 4-deep TX FIFO is full).

Does the peripheral not support writing while a read in progress and blocked by the FIFOEmpty line?

  • Petar T. said:
    Does the peripheral not support writing while a read in progress and blocked by the FIFOEmpty line?

    It does not support writing while a read is in progress and blocked.

  • I did the following code, and for some reason, despite stopping the read, the write still would not work, and it will just fill up the 4-deep write FIFO:

            EPINonBlockingReadStart(EPI0_BASE, 0, 20);
            EPINonBlockingReadStop(EPI0_BASE, 0);
    
            uint16_t data = 0;
            for (i = 0; i < 16; ++i)
            {
                // wait until the write FIFO has enough space
                // returns whether there are empty slots
                while (EPIWriteFIFOCountGet(EPI0_BASE) == 0);
    
                HWREGH(0xA0000000) = data;
                ++data;
            }
    

    The only times write works is either after a read start completes on its own, or at the beginning of a program when I never start a read in the first place.

    I've made sure that the FIFO that is receiving my data is not full.

  • From the datasheet it looks like you need to wait for EPISTAT.ACTIVE to be clear and then drain the FIFO.