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.

TM4E129BNCZAD PE7 pin doesn't work in GPIO mode

Other Parts Discussed in Thread: TM4E129BNCZAD, TM4C129XNCZAD

Hi e2e,

Customer is developing TM4E129BNCZAD MCU in their application, they found PE7 doesn't work in GPIO mode, the schematic is very simple in PE7 port, only pull up and pull down resistor in external circuit.

They are using the same initial code and GPIO operation code in both PE6 and PE7, PE6 works fine, but PE7 doesn't work.

You can see PE7 marked in yellow, if PE7 configured as OUTPUT, software can not output high or low normally, if PE7 configured as INPUT, the external pull-up resistor is mounted and pull-down resistor is removed, software read is still low.

They also tried to measure the impedance of this pin, it's normal as other pin.

Do you have any suggestion about this issue, thanks in advance.

  • Check the datasheet section 10.1. PE7 is locked because it can be used as a NMI. To unlock the pin, see the description of "Commit Control" in section 10.3.4.

  • Hi Bob, 

    Got it, we will have a try, thanks for your help.

  • Hello Bob,

    We tried to do as below code from Tiva ware, but the PE7 is still in lock status, can you help to have a check on that?

    Really thanks for your help on that.

    #define GPIO_LOCK_KEY  0x4C4F434B

        // PE7 unlock.

        HWREG(GPIO_PORTE_BASE + GPIO_O_LOCK) = GPIO_LOCK_KEY;

        HWREG(GPIO_PORTE_BASE + GPIO_O_CR) = 0xff;

        ROM_GPIOPinTypeGPIOInput(GPIO_PORTE_BASE, GPIO_PIN_7);    

        ROM_GPIOPinTypeGPIOOutput(GPIO_PORTE_BASE, GPIO_PIN_7);

        ROM_GPIOPinWrite(GPIO_PORTE_BASE, GPIO_PIN_7, 1);   

     

  • Try this code. It works for me on a TM4C129XNCZAD.

        MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE);
        while(!MAP_SysCtlPeripheralReady(SYSCTL_PERIPH_GPIOE))
        {
        }
        GPIOUnlockPin(GPIO_PORTE_AHB_BASE, GPIO_PIN_7);
        GPIOPinTypeGPIOOutput(GPIO_PORTE_AHB_BASE, GPIO_PIN_7);
    
        //
        // Loop Forever
        //
        while(1)
        {
            GPIOPinWrite(GPIO_PORTE_AHB_BASE, GPIO_PIN_7, GPIO_PIN_7);
            //
            // Delay for a bit
            //
            MAP_SysCtlDelay(ui32SysClock/6);
    
            GPIOPinWrite(GPIO_PORTE_AHB_BASE, GPIO_PIN_7, 0u);
            //
    
            //
            // Delay for a bit
            //
            MAP_SysCtlDelay(ui32SysClock/6);
        }