Tool/software:
Hello!!
I am using TM4C1230H6PM controller in my project, i am using PB1(pin no 46) as an output pin and trying to toggle that pin but it is not getting toggled even if an tring to make the pin high it is staying in low. what might be the issue ??? i have checked with other pins PB2 and PB3 there also it is happening in the same way in that port i can able to toggle only the PB0 pin. here is my code please have a look and suggest me if any changes..
#include "main.h" int Index = 1; int count; int check_release,relese_couter; extern uint8_t rev_data[3]; int value; #define GNSS_OFF "GF0" #define GNSS_ON "GF1" #define SYNC_OFF "SW0" #define SYNC_ON "SW1" #define HOLD "HLD" void Keypad_Init(void) { ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB); //LED ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF); ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD); ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE); // This is using for the PD7 Pin 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) &= 0x80; HWREG(GPIO_PORTD_BASE + GPIO_O_DEN) |= 0x80; HWREG(GPIO_PORTD_BASE + GPIO_O_LOCK) = 0; /* HWREG(GPIO_PORTB_BASE + GPIO_O_LOCK) = GPIO_LOCK_KEY; HWREG(GPIO_PORTB_BASE + GPIO_O_AFSEL) &= ~(1 << 1); HWREG(GPIO_PORTB_BASE + GPIO_O_AMSEL) &= ~(1 << 1); HWREG(GPIO_PORTB_BASE + GPIO_O_DEN) |= (1 << 1); HWREG(GPIO_PORTB_BASE + GPIO_O_DIR) |= (1 << 1); HWREG(GPIO_PORTB_BASE + GPIO_O_ODR) &= ~(1 << 1); HWREG(GPIO_PORTB_BASE + GPIO_O_PUR) |= (1 << 1); HWREG(GPIO_PORTB_BASE + GPIO_O_PDR) &= ~(1 << 1); HWREG(GPIO_PORTB_BASE + GPIO_O_LOCK) = 0; */ /******* KEYPAD PB *********/ ROM_GPIOPinTypeGPIOOutput(GPIO_PORTB_BASE, GPIO_PIN_0); ROM_GPIOPadConfigSet(GPIO_PORTB_BASE, GPIO_PIN_0, GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD_WPD); ROM_GPIOPinTypeGPIOOutput(GPIO_PORTB_BASE, GPIO_PIN_1); ROM_GPIOPadConfigSet(GPIO_PORTB_BASE, GPIO_PIN_3, GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD_WPD); ROM_GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_1,0); delay(1000); ROM_GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_1,1);