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.
Hi,
I am working with TM4C1294KCPDT controller coustom board . I Need to unlock the PD7 Special pin . Please Share me a code to unlock the pin.
Thanks in advance
Thanks & regards,
Rani
Hello Rani,
Please see the following FAQ post: https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1020815/faq-how-to-get-locked-gpio-pins-on-tm4c129-devices-to-work
Best Regards,
Ralph Jacobi
Jacobi,
I have unlocked the PD7 Pin suucessfuly by set the below commands . But after that adding the unlock instruction i'm facing the problem that is others pins in the D ports are not working.
HWREG(GPIO_PORTD_BASE + GPIO_O_LOCK) = GPIO_LOCK_KEY;
HWREG(GPIO_PORTD_BASE + GPIO_O_CR) |= 0x80;
HWREG(GPIO_PORTD_BASE + GPIO_O_AFSEL) |= 0x400;
HWREG(GPIO_PORTD_BASE + GPIO_O_DEN) |= 0x80;
HWREG(GPIO_PORTD_BASE + GPIO_O_LOCK) = 0;
Please help me to short out this problem.
Thanks in advance.
Regards,
Rani
Hello Rani,
Once you do the unlock process with:
HWREG(GPIO_PORTD_BASE + GPIO_O_LOCK) = GPIO_LOCK_KEY; HWREG(GPIO_PORTD_BASE + GPIO_O_CR) |= 0x80;
Just use GPIO driverlib calls for configuring the IO. Probably the issue is:
HWREG(GPIO_PORTD_BASE + GPIO_O_LOCK) = 0;
Best Regards,
Ralph Jacobi
Jacobi,
Do you mean i need to initalise the GPIO pins after unlock proceess .Am i Correct? I did initalization before the unlock process.
Best Regards,
Rani
Hello Rani,
You would do the System Control Enable for the GPIO port first.
Then you do the Unlock process for the pins.
And then you configure the IO based on what you need for your application.
For example:
// // Enable the peripherals used by this example. // MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF); // // Unlock the Port F Pin 0 GPIO as it defaults as a locked NMI pin. // MAP_GPIOUnlockPin(GPIO_PORTF_BASE, GPIO_PIN_0); // // Set the pin to use the internal pull-up. // MAP_GPIOPadConfigSet(GPIO_PORTF_BASE, GPIO_PIN_0, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU);
Best Regards,
Ralph Jacobi