My objective is simple. I want to toggle the output of a GPIO pin. I am using GPIO31 and observing the LED on the board to check for toggle. I also have a logic analyzer on the side to see if the LED was blinking too fast to observe. So far, I have not been successful.
What I have tried:
I setup the GPIO configuration (note that I only care for GPIO31 at this point)
GPAQSEL2 = 0x00000000; // (pins 16 - 31) Select input qualification type for GPIO16 to GPIO31. The input qualification of each GPIO
// input is controlled by two bits as shown in Figure 1-66.
// 00 Synchronize to SYSCLKOUT only. Valid for both peripheral and GPIO pins
GPAMUX2 = 0x00000000; (bits need to be set to 00 for input/output use)
GPADIR = 0xF0000000; // F sets the pins 28, 29, 30, 31 high which makes them outputs. (0 signifies an input)
GPAPUD = 0x3FFFFFFF; // Configure the internal pullup resistor on the selected GPIO Port A pin. Each GPIO pin
// corresponds to one bit in this register. GPIO31 has pullup resistor disabled
Now to toggle the pin, I have inserted both GPASET = 0x80000000 and GPACLEAR = 0x80000000 in different parts of the program as it loops through.
The result of all this is the LED stays high the whole time. As a reminder, I used the logic analyzer to ensure the LED was not blinking too fast.
Any tips on what I am doing wrong? Thanks