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.

TM4C1294 EPI Current problem

I am having an issue with the EPI port set as GPIO . When trying to send data to the port I noticed the signal was only around 0.5V  I supplied 3.3V through a 10R resistor and found that current to one of the pins is 80mA so I guess that's why my signal was so small.

I found that by changing  GPIOPinTypeEPI(GPIO_PORTH_BASE, GPIO_PIN_0); to  GPIODirModeSet(GPIO_PORTH_BASE, GPIO_PIN_0,   GPIO_DIR_MODE_IN); fixed the problem but then I'm not able to read.

I configured in this thread:

e2e.ti.com/.../1404200

Any ideas?

Lee.

  • Hello Lee,

    When the issue occurs can you check what is the setting of the GPIO PortH registers?

    Regards
    Amit
  • Hi Amit,

    The port seem permanently in this situation and I haven't managed to read data yet, apart from when I had 3 wires hardwired to 3.3v for testing.

    The register values are:

    GPIO_PORTH_AHB GPIO register offsets
    GPIO_DATA 0x00000002 GPIO Data [Memory Mapped]
    GPIO_DIR 0x00000000 GPIO Direction [Memory Mapped]
    GPIO_IS 0x00000000 GPIO Interrupt Sense [Memory Mapped]
    GPIO_IBE 0x00000000 GPIO Interrupt Both Edges [Memory Mapped]
    GPIO_IEV 0x00000000 GPIO Interrupt Event [Memory Mapped]
    GPIO_IM 0x00000000 GPIO Interrupt Mask [Memory Mapped]
    GPIO_RIS 0x00000003 GPIO Raw Interrupt Status [Memory Mapped]
    GPIO_MIS 0x00000000 GPIO Masked Interrupt Status [Memory Mapped]
    GPIO_ICR 0x00000000 GPIO Interrupt Clear [Memory Mapped]
    GPIO_AFSEL 0x0000000F GPIO Alternate Function Select [Memory Mapped]
    GPIO_DR2R 0x000000FF GPIO 2-mA Drive Select [Memory Mapped]
    GPIO_DR4R 0x0000000F GPIO 4-mA Drive Select [Memory Mapped]
    GPIO_DR8R 0x0000000F GPIO 8-mA Drive Select [Memory Mapped]
    GPIO_ODR 0x00000000 GPIO Open Drain Select [Memory Mapped]
    GPIO_PUR 0x00000000 GPIO Pull-Up Select [Memory Mapped]
    GPIO_PDR 0x00000000 GPIO Pull-Down Select [Memory Mapped]
    GPIO_SLR 0x00000000 GPIO Slew Rate Control Select [Memory Mapped]
    GPIO_DEN 0x0000000F GPIO Digital Enable [Memory Mapped]
    GPIO_LOCK 0x00000001 GPIO Lock [Memory Mapped]
    GPIO_CR 0x000000FF GPIO Commit [Memory Mapped]
    GPIO_AMSEL 0x00000000 GPIO Analog Mode Select [Memory Mapped]
    GPIO_PCTL 0x0000FFFF GPIO Port Control [Memory Mapped]
    GPIO_ADCCTL 0x00000000 GPIO ADC Control [Memory Mapped]
    GPIO_DMACTL 0x00000000 GPIO DMA Control [Memory Mapped]
    GPIO_SI 0x00000000 GPIO Select Interrupt [Memory Mapped]
    GPIO_DR12R 0x00000000 GPIO 12-mA Drive Select [Memory Mapped]
    GPIO_WAKEPEN 0x00000000 GPIO Wake Pin Enable [Memory Mapped]
    GPIO_WAKELVL 0x00000000 GPIO Wake Level [Memory Mapped]
    GPIO_WAKESTAT 0x00000000 GPIO Wake Status [Memory Mapped]
    GPIO_PP 0x00000001 GPIO Peripheral Property [Memory Mapped]
    GPIO_PC 0x000000FF GPIO Peripheral Configuration [Memory Mapped]

    Regards,

    Lee.

  • Hello Lee

    The Pin PH0 is being driven 0 by the EPI when configured as EPI Pin. This is allowing for a current sink path via the resistor.

    Regards
    Amit
  • Hi Amit,

    So how do I stop my signal coming from another micro or FPGA being pulled low?? At the moment the signals are being pulled down to 0.5V so I'm not reading high values. It is required to be set as an EPI pin to read the EPI isn't it??

    Regards,
    Lee.
  • Hello Lee,

    To recap (correct my understanding):
    1. The Pin PH0 has a 10KOhm resistor as a Pull Up and that causes the voltage to drop to 0.5V at the Pin. That would mean 3.3-0.5V/10K as the current sink = 280uA and not 80mA
    2. If the Pin is to be used for EPI then why have a Pull Up in the first place?

    Regards
    Amit
  • Hi Amit,

    Sorry Amit for the confusion. There are no pullups.

    The EPI pins are connected directly to 3 ports of a microcontroller which are push-pull output. I wasn't able to read data from the EPI so I investigated and found the High levels were only at 0.5V . Disconnected from the TM4C1294 board the transmitted signals are 3.3V for a high.

    To test why the High level voltage I was receiving was so low, I connected 3.3V to one of the EPI pins via an 18 Ohm resistor ( sorry I thought it was 10 ohm) to measure the current draw which is 44mA . Still significant and excessive.

    Regards,
    Lee.

  • Hello Lee,

    Now that clarifies. The Pin from the TM4C129 are driven pins and are turned in input mode only when doing a data read. Since there is an FPGA on the other side, and to avoid a bus contention, they can be kept in input mode, and turning around to drive only when data is to be sent.

    Regards
    Amit
  • Thanks again Amit.

    Regards,
    Lee.
  • Hi Again Amit,

    To keep in input mode do I just use the GPIODirModeSet(GPIO_PORTH_BASE, GPIO_PIN_0, GPIO_DIR_MODE_IN);

    I tried this earlier but the EPI wasn't reading data. I didn't try it on all the pins though. I'll try again.

    Regards,
    Lee.
  • Hello Lee

    By using the GPIODirModeSet you are effectively clearing the AFSEL bit. As a result the Pin will revert to GPIO function and not peripheral function.

    Regards
    Amit
  • Hi Amit,

    GPIODIR is already set to 0. GPIO_DIR 0x00000000 GPIO Direction [Memory Mapped] so is there another register I should be looking at setting/clearing?

    Regards,
    Lee.
  • Hello Lee,

    It is the AFSEL register.

    Regards
    Amit
  • Hi Amit,

    I will try when I'm back at work.

    It was my understanding that if I clear the AFSEL, then the pin is controlled by GPIO and not the peripheral (EPI).

    From the Datasheet:
    The GPIOAFSEL register is the mode control select register. If a bit is clear, the pin is used as a
    GPIO and is controlled by the GPIO registers.

    Perhaps I don't quite understand the configuration of the registers.

    Regards,
    Lee.
  • Hello Lee

    You are right. AFSEL when cleared will disconnect the Pin from Peripheral. The use of the IN in GPIOPadConfigSet clears the AFSEL

    Regards
    Amit
  • Hi Amit,

    I am confused. How can I set the EPI as an input so that it is not loading the input signal. You mentioned that it is driven and I need to set it as an input. If clearing the AFSEL doesn't do this, and the DIR is already 0, I don't quite understand.


    Regards,
    Lee.
  • Hello Lee

    I think we both were confused. The EPI Pins will be set as Input only when reading the data. Otherwise they will be driven. The FPGA must be modified in this case to treat all such pins as Input and only drive the pins when EPI reads the data as per the diagrams in the Specification.

    Regards
    Amit
  • Hi Amit,

    So there is no way to set the EPI to Tristate/High impedance or undriven  whilst it is not reading.? As I only wish to do reads (currently from a microcontroller) it seems reasonable that there should be a setting so that the EPI can opereate as per a standard GPIO.

    I take it you are referring to Figure 11-20 and Figure 11-21?

    Regards,

    Lee.

  • Hello Lee,

    No. The only way it may be able to do is in General Purpose Mode.

    Regards
    Amit
  • Hi Amit,

    I believe the EPI it is configured for general purpose mode. The pins are still being driven low though.

    Regards,
    Lee.
  • Hello Lee,

    Apologies!! Let me double check and confirm. If it is not possible with the GP mode then is it possible for you to revert the implementation to any of the other modes like HBx?

    Regards
    Amit
  • Hi Amit,

    I am currently trying to read data that is being sent from a microcontroller as 3 Bytes (24 bits) at 200Khz. I haven't looked at HDx however I would have to change the read rate to single bytes at 600 Khz which starts to affect the Ethernet send rate which is the other thread in this project.

    Regards,
    Lee.
  • Hello Lee,

    I can confirm that when not reading the Pin shall be driven by the EPI Controller. In HB16 mode you can still do 2 bytes of read unlike HB8 where it 1 byte. This way it can be 2 Bytes at 300KHz.

    Regards
    Amit
  • Hi Amit,

    Thank you for looking at this. It is a pity that the EPI is driven low when in GP mode when not doing a read however I will try as you suggest.

    Regards,
    Lee.