I cannot make LEDs turn off


#1

Hi, guys!
I’m first at use CC3200 LaunchPad.
I’m trying to control LED of CC3200 by my android phone with tcp_socket example.
but I editted my code like this :
void main()
{
long lRetVal = -1;

//
// Board Initialization
//
BoardInit();

//
// Initialize the uDMA
//
UDMAInit();

//
// Configure the pinmux settings for the peripherals exercised
//
PinMuxConfig();

//
// Configuring UART
//
InitTerm();

//
// Display banner
//
DisplayBanner(APPLICATION_NAME);

//
// Configure all 3 LEDs
//
GPIO_IF_LedConfigure(LED1|LED2|LED3);
// switch off all LEDs
GPIO_IF_LedOff(MCU_ORANGE_LED_GPIO);
GPIO_IF_LedOff(MCU_GREEN_LED_GPIO);

//
// I2C Init
//
lRetVal = I2C_IF_Open(I2C_MASTER_MODE_FST);
if(lRetVal < 0)
{
ERR_PRINT(lRetVal);
LOOP_FOREVER();
}

//Init Temprature Sensor
lRetVal = TMP006DrvOpen();
if(lRetVal < 0)
{
ERR_PRINT(lRetVal);
LOOP_FOREVER();
}

//
// Following function configure the device to default state by cleaning
// the persistent settings stored in NVMEM (viz. connection profiles &
// policies, power policy etc)
//
// Applications may choose to skip this step if the developer is sure
// that the device is in its default state at start of applicaton
//
// Note that all profiles and persistent settings that were done on the
// device will be lost
//
lRetVal = ConfigureSimpleLinkToDefaultState();

if(lRetVal < 0)
{
  if (DEVICE_NOT_IN_STATION_MODE == lRetVal)
     UART_PRINT("Failed to configure the device in its default state \n\r");

  LOOP_FOREVER();
}

UART_PRINT("Device is configured in default state \n\r");

//
// Asumption is that the device is configured in station mode already
// and it is in its default state
//
lRetVal = sl_Start(0, 0, 0);
if (lRetVal < 0)
{
    UART_PRINT("Failed to start the device \n\r");
    LOOP_FOREVER();
}

UART_PRINT("Device started as STATION \n\r");


UART_PRINT("Connecting to AP: %s ...\r\n",SSID_NAME);

// Connecting to WLAN AP - Set with static parameters defined at common.h
// After this call we will be connected and have IP address
lRetVal = WlanConnect();
if(lRetVal < 0)
{
    UART_PRINT("Connection to AP failed \n\r");
    LOOP_FOREVER();
}

UART_PRINT("Connected to AP: %s \n\r",SSID_NAME);

UART_PRINT("Device IP: %d.%d.%d.%d\n\r\n\r",
                  SL_IPV4_BYTE(g_ulIpAddr,3),
                  SL_IPV4_BYTE(g_ulIpAddr,2),
                  SL_IPV4_BYTE(g_ulIpAddr,1),
                  SL_IPV4_BYTE(g_ulIpAddr,0));

#ifdef USER_INPUT_ENABLE
lRetVal = UserInput();
if(lRetVal < 0)
{
ERR_PRINT(lRetVal);
LOOP_FOREVER();
}
#else
lRetVal = BsdTcpClient(PORT_NUM);
if(lRetVal < 0)
{
UART_PRINT(“TCP Client failed\n\r”);
LOOP_FOREVER();
}

lRetVal = BsdTcpServer(PORT_NUM);
if(lRetVal < 0)
{
    UART_PRINT("TCP Server failed\n\r");
    LOOP_FOREVER();
}

#endif

UART_PRINT("Exiting Application ...\n\r");

//
// power of the Network processor
//
lRetVal = sl_Stop(SL_STOP_TIMEOUT);

while (1)
{
    _SlNonOsMainLoopTask();
}

}
But when I debug it and press F8 with tera term, It doesn’t show me anyting.
And I found the GPIO_IF_LedOff doesn’t work. How can I make it work?
If you need another part of code, just reply please.
Thank you.


#2

Hey @YuSehoon,

Exosite’s community forum is here to provide help in using Exosite’s Software and Exosite’s Products. It looks like your question is explicitly about the CC3200 and how to use TI’s TCP socket application example. We are not in a good position to support our partner’s products, because we are not experts on their products. Knowing what I know, their wireless connectivity troubleshooting page sounds like a reasonable place to start.

Otherwise I would recommend posting on TI’s engineer to engineer forums. In the meantime this thread will be locked since its’ topic not directly pertain to Exosite.

Feel free to get a hold of us again if you have questions about using using our software!

Happy to help,
-Martin


#3