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.

TM4C123BH6PZ: TM4C123

Part Number: TM4C123BH6PZ
Other Parts Discussed in Thread: EK-TM4C1294XL,

What speed can the GPIO pin read up to for an input capture? Specifically port L7.

Thanks! 

  • Hello Joe,

    Can you clarify a bit more on what the use case is here? Are you trying to just detect a specific edge event (i.e. just a rising edge) or measuring the period of a signal? Something else?

  • Yes, I am trying to measure the period of a signal coming in. Do GPIO pins have a sample rate or how fast can a signal be read in through port L7?

    Thanks,

    Joe  

  • Hi Joe,

    You would do that with two GPIO and use timers to handle the counting piece in order to actually assess what the period would be. You can see an example of this in TivaWare under our EK-TM4C1294XL launchpad examples. In 2.2.0.295 we released a 'timer_edge_count' example that does exactly what you would be doing.

  • Hi Ralph,

    I unfortunately cannot change it on our product. We have a PWM input to a GPIO pin on the TM4C123BH6PZ. Do you know how fast port L7 can read a digital PWM input? I am thinking the PWM frequency is operating too fast and the microcontroller is missing parts of the signal.  

    Thanks,

    Joe

  • Hello Joe,

    In general, the maximum speed of the signal you can get in edge time mode is 1/4 of system clock, so for TM4C123x that'd be 20MHz.

    For rising-edge detection, the input signal must be High for at least two system clock periods
    following the rising edge. Similarly, for falling edge detection, the input signal must be Low
    for at least two system clock periods following the falling edge. Based on this criteria, the
    maximum input frequency for edge detection is 1/4 of the system frequency.

    However that assumes you have no latency as well. Interrupt latency would impact that and usually timers wouldn't have the highest latency in the system. So that is something you'd need to assess based on what you are doing.

    And to clarify, for period detection of the whole signal - i.e. rising edge to another rising edge, you can do this with just the one GPIO easily so if that is all you require then you are set hardware wise.

    This might be more detailed than you are looking for, but what I had been referring to in my last post before was actually step beyond whole signal period which was knowing the period of the high period of signal for duty cycle detection which is why it used two pins to detect the separate edge events.

    Also you mention PL7 but that isn't on the device you referenced but you meant to say TM4C123BH6ZRB which is very similar part number? :)