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.

TM4C123GH6PM: Interrupts misfiring

Part Number: TM4C123GH6PM
Other Parts Discussed in Thread: EK-TM4C123GXL

Hello,

I have set a GPIO to falling edge triggered interrupt as follows - 

// Enabling TACH input on PA6 as falling edge triggered interrupt (Pull up is on TACh line)
GPIOPinTypeGPIOInput(GPIO_PORTA_BASE, GPIO_PIN_6);
GPIOPadConfigSet(GPIO_PORTA_BASE, GPIO_PIN_6, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_OD); 
GPIOIntTypeSet(GPIO_PORTA_BASE, GPIO_PIN_6, GPIO_FALLING_EDGE);
GPIOIntEnable(GPIO_PORTA_BASE, GPIO_PIN_6);
IntEnable(INT_GPIOA);

But once in ~30 samples, a rising edge interrupt is triggered. Attaching a scope shot for that.

Am i missing any configuration steps?

Thanks,

Nihit

  • nihit bhavsar said:
    But once in ~30 samples, a rising edge interrupt is triggered.

    The following 'Diagnostic Method' is suggested:

    • employ a lowered value external pull-up R, as close as possible to the MCU's  PA6 (aka: Tach Input)   (Note the 'rise time' of the Tach Signal is poor.)
    • confirm that the Tach's Ground is robustly 'Tied to your MCU's Ground.'
    • If (both) of the above steps, 'Fail to Cure' - increase the Sweep Speed of your scope - and observe carefully for the presence of a 'transient Lo driving signal' - present w/in the 'early rise portion' of the Tach's output being 'pulled up.'  (this during the occurrence of the (illegal) 'Rising Edge interrupt.')
    • temporarily replace the 'Tach Signal' w/the output of one of the MCU's 'Timer Pins' - configured to PWM Output - at a similar frequency.   Observe to determine if the issue continues.   (will determine if the Tach or its output is problematic.)
    • consider, locate & if possible remove - 'any' Noise Sources or Higher Current Pulses - which may occur 'at/around' the 'Time of Arrival (toa) of the illegal Rising Edge.'
    • it is always good practice to, 'Shorten, isolate and (sometimes) 'Shield' the cable/wires carrying your Tach Signal.'
    • as a 'test of that specific MCU pin - temporarily switch to another MCU Input (ideally on another MCU Port) - and test/note if the issue persistsl   (such tests (both) the pin & port!)
    • the signal level 'DOES' appear somewhat 'excessive' - is your voltage regulator performing w/in the MCU's specification?

    It is believed the 'one or more' of the above will, 'Lead to your issue's resolution,'

  • Hello Nihit,

    Have you been able to try any of cb1's diagnostic suggestions here? Let us know your results if so.

    Also if you have the full project, I could do a few tests myself - presuming this is on the EK-TM4C123GXL LaunchPad.