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.

TM4C1294KCPDT: EPI configuration

Part Number: TM4C1294KCPDT

respected sir, dear friends,

I m configuring general purpose mode of EPI . I m referring the example in driver library user guide. in that example they have not configured gpio pins for EPI purpose. So do i need to configure the gpio pins for epi purpose or not?? 

  • Hi Digvijay,

     Can you refer to the TivaWare EPI example under <TivaWare_Installation>\examples\peripherals\epi? Below is the code snippet in the example to configure GPIO pins for EPI.

    //
        // This step configures the internal pin muxes to set the EPI pins for use
        // with EPI.  Please refer to the datasheet for more information about pin
        // muxing.  Note that EPI0S27:20 are not used for the EPI SDRAM
        // implementation.
        // TODO: Update this section based upon the EPI pin assignment on your
        // target part.
        //
    
        //
        // EPI0S4 ~ EPI0S7: C4 ~ 7
        //
        ui32Val = HWREG(GPIO_PORTC_BASE + GPIO_O_PCTL);
        ui32Val &= 0x0000FFFF;
        ui32Val |= 0xFFFF0000;
        HWREG(GPIO_PORTC_BASE + GPIO_O_PCTL) = ui32Val;
    
        //
        // EPI0S8 ~ EPI0S9: A6 ~ 7
        //
        ui32Val = HWREG(GPIO_PORTA_BASE + GPIO_O_PCTL);
        ui32Val &= 0x00FFFFFF;
        ui32Val |= 0xFF000000;
        HWREG(GPIO_PORTA_BASE + GPIO_O_PCTL) = ui32Val;
    
        //
        // EPI0S10 ~ EPI0S11: G0 ~ 1
        //
        ui32Val = HWREG(GPIO_PORTG_BASE + GPIO_O_PCTL);
        ui32Val &= 0xFFFFFF00;
        ui32Val |= 0x000000FF;
        HWREG(GPIO_PORTG_BASE + GPIO_O_PCTL) = ui32Val;
    
        //
        // EPI0S12 ~ EPI0S15: M0 ~ 3
        //
        ui32Val = HWREG(GPIO_PORTM_BASE + GPIO_O_PCTL);
        ui32Val &= 0xFFFF0000;
        ui32Val |= 0x0000FFFF;
        HWREG(GPIO_PORTM_BASE + GPIO_O_PCTL) = ui32Val;
    
        //
        // EPI0S16 ~ EPI0S19: L0 ~ 3
        //
        ui32Val = HWREG(GPIO_PORTL_BASE + GPIO_O_PCTL);
        ui32Val &= 0xFFFF0000;
        ui32Val |= 0x0000FFFF;
        HWREG(GPIO_PORTL_BASE + GPIO_O_PCTL) = ui32Val;
    
        //
        // EPI0S28 : B3
        //
        ui32Val = HWREG(GPIO_PORTB_BASE + GPIO_O_PCTL);
        ui32Val &= 0xFFFF0FFF;
        ui32Val |= 0x0000F000;
        HWREG(GPIO_PORTB_BASE + GPIO_O_PCTL) = ui32Val;
    
        //
        // EPI0S29 ~ EPI0S30: N2 ~ 3
        //
        ui32Val = HWREG(GPIO_PORTN_BASE + GPIO_O_PCTL);
        ui32Val &= 0xFFFF00FF;
        ui32Val |= 0x0000FF00;
        HWREG(GPIO_PORTN_BASE + GPIO_O_PCTL) = ui32Val;
    
        //
        // EPI0S00 ~ EPI0S03, EPI0S31 : K0 ~ 3, K5
        //
        ui32Val = HWREG(GPIO_PORTK_BASE + GPIO_O_PCTL);
        ui32Val &= 0xFF0F0000;
        ui32Val |= 0x00F0FFFF;
        HWREG(GPIO_PORTK_BASE + GPIO_O_PCTL) = ui32Val;
    
        //
        // Configure the GPIO pins for EPI mode.  All the EPI pins require 8mA
        // drive strength in push-pull operation.  This step also gives control of
        // pins to the EPI module.
        //
        GPIOPinTypeEPI(GPIO_PORTA_BASE, EPI_PORTA_PINS);
        GPIOPinTypeEPI(GPIO_PORTB_BASE, EPI_PORTB_PINS);
        GPIOPinTypeEPI(GPIO_PORTC_BASE, EPI_PORTC_PINS);
        GPIOPinTypeEPI(GPIO_PORTG_BASE, EPI_PORTG_PINS);
        GPIOPinTypeEPI(GPIO_PORTK_BASE, EPI_PORTK_PINS);
        GPIOPinTypeEPI(GPIO_PORTL_BASE, EPI_PORTL_PINS);
        GPIOPinTypeEPI(GPIO_PORTM_BASE, EPI_PORTM_PINS);
        GPIOPinTypeEPI(GPIO_PORTN_BASE, EPI_PORTN_PINS);