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.

TM4C129CNCZAD: Interuupt not working

Part Number: TM4C129CNCZAD

Dear Sir,

We are migrating from stellaris LM3S9B96 to TM4c129XCNZAD.

The ROM.h also modified as there is missing definition below in the file

#if defined(TARGET_IS_BLIZZARD_RA1) || \
defined(TARGET_IS_BLIZZARD_RA3) || \
defined(TARGET_IS_BLIZZARD_RB1) || \
defined(TARGET_IS_SNOWFLAKE_RA0)
#define ROM_GPIOPinIntEnable \
((void (*)(uint32_t ui32Port, \
uint8_t ui8Pins))ROM_GPIOTABLE[7])
#endif

#if defined(TARGET_IS_BLIZZARD_RA1) || \
defined(TARGET_IS_BLIZZARD_RA3) || \
defined(TARGET_IS_BLIZZARD_RB1) || \
defined(TARGET_IS_SNOWFLAKE_RA0)
#define ROM_GPIOPinIntDisable \
((void (*)(uint32_t ui32Port, \
uint8_t ui8Pins))ROM_GPIOTABLE[8])
#endif

#if defined(TARGET_IS_BLIZZARD_RA1) || \
defined(TARGET_IS_BLIZZARD_RA3) || \
defined(TARGET_IS_BLIZZARD_RB1) || \
defined(TARGET_IS_SNOWFLAKE_RA0)
#define ROM_GPIOPinIntStatus \
((long (*)(uint32_t ulPort, \
bool bMasked))ROM_GPIOTABLE[9])
#endif

#if defined(TARGET_IS_BLIZZARD_RA1) || \
defined(TARGET_IS_BLIZZARD_RA3) || \
defined(TARGET_IS_BLIZZARD_RB1) || \
defined(TARGET_IS_SNOWFLAKE_RA0)
#define ROM_GPIOPinIntClear \
((void (*)(uint32_t ui32Port, \
uint8_t ui8Pins))ROM_GPIOTABLE[10])
#endif

 

We are configure  Pin 6 for external interrupt but programme stuck after executing"ROM_GPIOPinIntEnable(GPIO_PORTM_BASE, GPIO_PIN_6); " & ROM_GPIOPinIntDisable.

I have used this command in two different cases and come to conclusion that after enabling program stuck and disabling it work.

Same is working in stellaris LM3s9B96. What is an issue?

Below are the steps

SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOM); // Enable the GPIO blocks of port pin used.
ROM_GPIOPinTypeGPIOInput(GPIO_PORTM_BASE,GPIO_PIN_6);// external interrupt pin

ROM_IntMasterEnable();


ROM_GPIOIntTypeSet(GPIO_PORTM_BASE, GPIO_PIN_6, GPIO_FALLING_EDGE); //Type of interrupt set for pin
ROM_GPIOPinIntEnable(GPIO_PORTM_BASE, GPIO_PIN_6); //Enable the Individual Pin sensing intrrupt
ROM_IntEnable(INT_GPIOM);

After task

ROM_GPIOPinIntDisable(GPIO_PORTM_BASE, GPIO_PIN_6); //Disable the Individual Pin sensing intrrupt
ROM_IntDisable(INT_GPIOM);

  • You should never modify the rom.h file. This file describes the internal ROM functions of the device. If there is a bug in a ROM based function, that function will be removed from the rom.h file. The current driver library version of that file should be used instead. Use of the MAP_ prefix instead of the ROM_ prefix will automatically cause the ROM version of the function to be used if available. If not available, the library version will be used.

    In your case, because of the additional functionality of the GPIO interrupts, the function was replaced entirely. The function you want is ROM_GPIOIntEnable() (note that "Pin" was dropped from the name. See the description of this function in SW-TM4C-DRL-UG-2.2.0.295.pdf.