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.

CC2640 GPIO LED

Other Parts Discussed in Thread: CC2640

Hi there,

I have this custom PCB with a cc2640 (4x4) on it and a led connected to DIO 2. I am trying to light the led using only the driverlib functions.

Code:

#include <stdlib.h>
#include <driverlib/ioc.h>
#include <driverlib/gpio.h>

int main(void) {
IOCPortConfigureSet(2, IOC_PORT_GPIO, 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 ); 

GPIO_setOutputEnableDio(2, GPIO_OUTPUT_ENABLE);
GPIO_toggleDio(2);
//GPIO_setDio(2);
//GPIO_writeDio(2, 1);
return 0;
}

I have verified the traces and the led.
Programmer: XDS100v3+

What am I missing ? What is the difference between the toggle function and set function ?