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.

EPI Read Cycle in TM4C129DNCPDT

Other Parts Discussed in Thread: TM4C129DNCPDT

I am assessing EPI peripheral in TM4C129DNCPDT micro controller.

I want to use EPI peripheral in Host Bus - 8 mode. Address and Data buses are non - multiplexed. i.e., Address and Data appear on separate lines.

New Write/Read Cycles are to be initiated by assertion of CS# signal. Write/Read Strobe signals decide Write/Read cycles.

I want to know whether "Dummy Read Cycle" is to be executed before reading data from external peripheral or data bytes could be read from external peripheral without Dummy Read Cycle.

Is flowchart or sample code available to provide details of Write/Read Cycles on EPI peripheral ?

  • Hello Sunil

    Which Dummy Read cycle are you referring to here?

    Regards
    Amit
  • Hi Amit,

    Thank you for responding to my query.

    Please refer to following code snippet in blue font.

    inline uint8_t
    EPIWorkaroundByteRead(uint8_t *pui8Addr)
    {
        uint32_t ui32Scratch;
        uint8_t ui8Value;

        __asm
        {
            //
            // Add a NOP to ensure we don’t have a flash read immediately before
            // the EPI read.
            //
            NOP

            //
            // Perform the read we're actually interested in.
            //
            LDRB ui8Value, [pui8Addr]

            //
            // Read from SRAM to ensure that we don't have an EPI read followed by
            // a flash read.
            //
            LDR ui32Scratch, [__current_sp()]
        }

        return(ui8Value);
    }

    Above code snippet has been excerpted from file epi.h available in TM4C129DNCPDT peripheral software library.

    Function inline uint8_t EPIWorkaroundByteRead(uint8_t *pui8Addr), reads a byte of data from external peripheral connected to EPI interface of MCU.

    The line of code on following lines in blue font excerpted from above function, is what i am referring to as "Dummy Read Cycle".

    //
    // Read from SRAM to ensure that we don't have an EPI read followed by
    // a flash read.
    //
    LDR ui32Scratch, [__current_sp()]

    My questions about the line of code written above are as follows :

    1.   What is purpose of this line of code ?

    2.   Could this line of code be omitted from the function ?

    3.   What would be the repercussions of omitting the line of code from the function ?

    4.   Does the line of code generates read transaction on parallel bus of EPI peripheral ?

    5.   is any peripheral register accessed after executing the line of code ?

     

    Thank you,

    Sunil Sawant

  • Hello Sunil

    Did you read the errata document for EPI#01? This code is the workaround code for the issue EPI#01.

    Regards

    Amit