I made an add-on board for the DK-TM4C123G and it includes 2 LEDs that are connected to PD6 and PD7 with series resistors and the LED cathodes to ground so that a High on either pin would cause the respective LED to light. I wrote code that sets up the PORTD pins and then flashes the LEDs alternately. My issue is that only the LED connected to PD6 flashes. I've tried it with 2 completely separate sets of hardware and they both give the same result. Can anyone see something obvious that I've missed?
Setup code is here...
void ConfigPBBpins (void){
ROM_SysCtlPeripheralEnable (SYSCTL_PERIPH_GPIOD);
ROM_GPIOPinTypeGPIOOutput (GPIO_PORTD_BASE, 0xC0); // outputs for 2-color LED
ROM_GPIOPadConfigSet(GPIO_PORTD_BASE, 0xC0, GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD);
}
I set up a variable like so...
uint8_t PortData;
and the code to alternately flash the LEDs is here...
while (1) {
ROM_SysCtlDelay(0xFFFFFF);
if (PortData){
ROM_GPIOPinWrite (GPIO_PORTD_BASE, 0xC0, 0x80);
PortData = 0;
}
else {
ROM_GPIOPinWrite(GPIO_PORTD_BASE, 0xC0, 0x40 );
PortData = 1;
}
Remember, the issue is that only the LED on PD6 flashes