HI guys,
I bought a new TIVA board and testing it I found a problem running the TivaWare "blinky" code. In code, they try to blink the green led from RGB led. When I run the code, the green led stays always in on state, same behavior with red led. Only the blue led has blinked. Then I changed the code to blink all RGB leds, my result was only blue led blinking and the others still in on state all the time. What can I do?
My code is below:
//*************** Blinky LED ***********************
int main(void) {
volatile unsigned long ulLoop;
SYSCTL_RCGC2_R = SYSCTL_RCGC2_GPIOF; // Enable the GPIO port
ulLoop = SYSCTL_RCGC2_R; // Do a dummy read to insert a few cycles
GPIO_PORTF_DIR_R = 0x0E; // In original code the value is 0x08
GPIO_PORTF_DEN_R = 0x0E; // In original code the value is 0x08
while(1) // Loop forever
{
GPIO_PORTF_DATA_R |= 0x0E; // In original code the value is 0x08
for(ulLoop = 0; ulLoop < 200000; ulLoop++) { }
GPIO_PORTF_DATA_R &= ~(0x0E); // In original code the value is 0x08
for(ulLoop = 0; ulLoop < 200000; ulLoop++) { }
}
}