HI
I am using the Launchxl F28379D board.I am trying to blink an external LED using Gpio6 , with this code I am able to blink the code on the board but was not able to blink the external led which is connected to pin80 (GPIO6).
Can some one please mention what is the reason for it? Why the same code works for the on board LED but is not able to make the GPIO6 high?
Attached is the code.
Kind Regards
Sana
#include "F28x_Project.h"
#define BLINKY_LED_GPIO 31
#define BLINKY_LED_GPIO6 80
main()
{
int x = 0;
int alarm = 0;
InitSysCtrl();
//
// Step 2. Initialize GPIO:
// This example function is found in the F2837xD_Gpio.c file and
// illustrates how to set the GPIO to it's default state.
//
InitGpio();
GPIO_SetupPinMux(BLINKY_LED_GPIO, GPIO_MUX_CPU1, 0);
GPIO_SetupPinOptions(BLINKY_LED_GPIO, GPIO_OUTPUT, GPIO_PUSHPULL);
GPIO_SetupPinMux(BLINKY_LED_GPIO6, GPIO_MUX_CPU1, 0);
GPIO_SetupPinOptions(BLINKY_LED_GPIO6, GPIO_OUTPUT, GPIO_PUSHPULL);
while (x<1000)
//while(1)
{
if(alarm==1000)
{
GPIO_WritePin(BLINKY_LED_GPIO, 1);
//EALLOW;
//GpioCtrlRegs.GPAPUD.bit.GPIO6 = 0; // Enable pullup on GPIO6
//GpioDataRegs.GPASET.bit.GPIO6 = 1; // Load output latch
//GpioCtrlRegs.GPAMUX1.bit.GPIO6 = 0; // GPIO6 = GPIO6
//GpioCtrlRegs.GPADIR.bit.GPIO6 = 1; // GPIO6 = output
//EDIS;
GPIO_WritePin(BLINKY_LED_GPIO6, 1);
continue;
}
x = x + 1;
GPIO_WritePin(BLINKY_LED_GPIO, 0);
}
while(2);
}