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.

Linux/LAUNCHXL-CC2650: Contiki problem

Part Number: LAUNCHXL-CC2650
Other Parts Discussed in Thread: CC2650

Tool/software: Linux

Hi,


I am new to programming with "Contiki OS". I just want to control an output port of the CC2650 launchpad, but I am not able to do it.  I chose the DIO6 pin, because it is connected to one of the two led of the board.

I have read in the file "gpio.h" that I must configure the pin as GPIO with the IOC module before using it.I did it, but the led is always off.

Can anyone help me, please? This is my code:

#include "contiki.h"   

#include <stdio.h>

#include "driverlib/ioc.h"
#include "driverlib/gpio.h"




#define IOC_CUSTOM_OUTPUT       (IOC_CURRENT_8MA  | IOC_STRENGTH_AUTO  |      \
                                 IOC_NO_IOPULL    | IOC_SLEW_DISABLE   |      \
                                 IOC_HYST_DISABLE | IOC_NO_EDGE        |      \
                                 IOC_INT_DISABLE  | IOC_IOMODE_NORMAL  |      \
                                 IOC_NO_WAKE_UP   | IOC_INPUT_DISABLE)


PROCESS(led_process, "LED process");

AUTOSTART_PROCESSES(&led_process);

PROCESS_THREAD(led_process, ev, data)
{
    PROCESS_BEGIN();

    printf("LED process begins...\r\n");
    
    IOCPortConfigureSet(IOID_6, IOC_PORT_GPIO, IOC_CUSTOM_OUTPUT);
    GPIO_setOutputEnableDio(GPIO_DIO_6_MASK, GPIO_OUTPUT_ENABLE);
    GPIO_setDio(GPIO_DIO_6_MASK);


    while(1)
    {

    }
    
    PROCESS_END();
}