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.

unlock NMI on PF0 but got into FaultISR loop

Other Parts Discussed in Thread: TM4C1231H6PM
Currently, I use TM4C1231H6PM mcu + cc3000 for application.
I use SSI1 as the communication interface between mcu and cc3000.
For this purpose, I have to unlock NMI on GPIO PF0.
I use the sample code to unlock PF0:
#define GPIO_LOCK_KEY_DD        0x4C4F434B
 
        //unlock PF0
HWREG(GPIO_PORTF_BASE + GPIO_O_LOCK) = GPIO_LOCK_KEY_DD;
HWREG(GPIO_PORTF_BASE + GPIO_O_CR) |= 0x01;
     HWREG(GPIO_PORTF_BASE + GPIO_O_LOCK) = 0;
 
At the first bootup, it works.
 
But I always get the failed in the following re-boot.
 
I attach JTAG to check the failed point and I find it's always blocked in FaultISR loop.
 
When system runs at 
 
HWREG(GPIO_PORTF_BASE + GPIO_O_CR) |= 0x01;
 
It will jump to FaultISR loop.
 
Anyone meet this issue before?
 
thanks
Gavin

 

  • Hi Gavin,

         Verify if there is actually a GPIO_LOCK_KEY_DD at your hw_gpio.h.

         Try without the _DD. See, code below from buttons.c. 

         HWREG(GPIO_PORTF_BASE + GPIO_O_LOCK) = GPIO_LOCK_KEY;

         HWREG(GPIO_PORTF_BASE + GPIO_O_CR) |= 0x01;

         HWREG(GPIO_PORTF_BASE + GPIO_O_LOCK) = 0;

    -kel

    - post edited

  • Hello Gavin,

    I would take a step back in the debug. Can you check if the SYSCTL_RCGC_GPIO Register at 0x400FE608 has bit-5 corresponding to Port-F set?

    Regards

    Amit