This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3200 Lunchpad Board LEDs 1 and 2 don'

Other Parts Discussed in Thread: SYSBIOS

Hi. I've got a problem to control the Board LEDs 1 and 2 with TI RTOS:

I was doing a lap season to toggle LEDs with the RTOS Timer. But the board LEDs 1 and 2 (D5 and D6) doesn't respond any time. D7 is fine

Also a break point before starting the bios doesn't turn of the LEDs.

Can you advice what's wrong?

/* XDCtools Header files */
#include <xdc/std.h>
#include <xdc/cfg/global.h>
#include <xdc/runtime/System.h>

/* BIOS Header files */
#include <ti/sysbios/BIOS.h>

/* TI-RTOS Header files */
#include <ti/drivers/GPIO.h>


/* Example/Board Header files */
#include "Board.h"

/*
 *  ======== ledToggle ========
 *  Toggle the Board_LED0. This is the fucntion called by the Clock module
 *
 *  */

Void led0Toggle(void)
{
    GPIO_toggle(Board_LED0);
}

/*
 *  ======== ledToggle ========
 *  Toggle the Board_LED1. This is the fucntion called by the Clock module
 *
 *  */

Void led1Toggle(void)
{
    GPIO_toggle(Board_LED1);
}



/*
 *  ======== main ========
 */
int main(void)
{
    /* Call board init functions. */
    Board_initGeneral();
    Board_initGPIO();
    

    /* Turn on user LED */
    GPIO_write(Board_LED0, Board_LED_OFF);
    GPIO_write(Board_LED1, Board_LED_OFF);
    GPIO_write(Board_LED2, Board_LED_OFF);

    System_printf("Starting the example\nSystem provider is set to SysMin. "
                  "Halt the target to view any SysMin contents in ROV.\n");
    /* SysMin will only print to the console when you call flush or exit */
    System_flush();

    /* Start BIOS */
    BIOS_start();

    return (0);
}

  • Now I found the issue:

    I forgot to add the configuration in the pin_mux_config.c

    void PinMuxConfig(void)
    {
        //
        // Enable Peripheral Clocks
        //
        PRCMPeripheralClkEnable(PRCM_GPIOA1, PRCM_RUN_MODE_CLK);

        //
        // Configure PIN_64 for GPIO Output
        //
        PinTypeGPIO(PIN_64, PIN_MODE_0, false);
        GPIODirModeSet(GPIOA1_BASE, 0x2, GPIO_DIR_MODE_OUT);

        //
        // Configure PIN_01 for GPIO Output
        //
        PinTypeGPIO(PIN_01, PIN_MODE_0, false);
        GPIODirModeSet(GPIOA1_BASE, 0x4, GPIO_DIR_MODE_OUT);

        //
        // Configure PIN_02 for GPIO Output
        //
        PinTypeGPIO(PIN_02, PIN_MODE_0, false);
        GPIODirModeSet(GPIOA1_BASE, 0x8, GPIO_DIR_MODE_OUT);
    }

  • Btw, GPIO_10&11 (green&yellow LED) are also used for i2c, which means you can't use the accelerometer and the temp sensor. Many of the LPs boosterpack pins are already in use or not connected on first look at the schematic.

    For example:
    P1.3 -> Switch3, Accelerometer INT (detachable from sensors by jumper)
    P1.9 -> Yellow LED, SCL (detachable from sensors by jumper)
    P1.10 -> Green LED, SDA (detachable from sensors by jumper)
    P3.3 -> FTDI_TX
    P3.5 + P3.6 are not connected by default
    P3.9 -> Red LED
    P4.1 - P4.8 are not connected by default
    P4.9 -> JTAG_TDO, RS232_RX
    P4.10 -> JTAG_TDI, RS232_TX
    P2.2 -> JTAG_TCK
    P2.8 -> SOP2
    P2.9 -> FTDI_RX
    P2.10 -> Switch 2

    Please correct me if im wrong.

    best regards, Dominik

  • Dominic

    your understanding is partially correct.

    For e.g. the I2C can be still used while the LEDs are connected. The LEDs have a buffer so these would not load the I2C bus.

    For the others we have jumpers in the path to isolate them. So all GPIOs may be used but some may have a weak pullp-down/pull-up (100K) on the board.

    SOP2 is a special pin and it should be used as a last resort.