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.

sl_start returns -1 in httpserver example

I am modifying the httpserver example.

Basically I want to extend this demo with an input pin to trigger on interrupt and then start a timer to trigger an output pin. All with very strict timing requirements.

The original httpserver example runs fine. But my new version gives an error in the ConfigureSimpleLinkToDefaultState function because sl_start(0,0,0); returns -1. I really don't understand why. The only thing I have done so far is to add a bunch of includes to be able to configure the interupt on GPIO13 (SW3). My interupt is not yet working. I tried commenting out all my new code (not much) but the error remains. So it probaly is caused by my includes... What did I miss?

So first I need to fix my error on sl_start. But after that the remaining question is about the way to get the switch to work on interrupt. To complete  my post with that, the following is what I use to configure the input interrupt (anything else is orriginal from the httpserver demo)

#define GPIO13   13

os_task
{
...
	cc_hndl tGPIOHndl;
	//
	// setting up GPIO, copied from idle_profile example
	//
	UART_PRINT("Set GPIO13 as interupt input \n\r");
	tGPIOHndl = cc_gpio_open(GPIO_13, GPIO_DIR_INPUT);
	cc_gpio_enable_notification(tGPIOHndl, GPIO_13, INT_FALLING_EDGE,
								(GPIO_TYPE_NORMAL));// | GPIO_TYPE_WAKE_SOURCE));
...
}

int gpio_intr_hndlr(int gpio_num)
{
    if(GPIO_13 == gpio_num)
    {
    	UART_PRINT("I");
    }
    else
    {
    	UART_PRINT("-");
    }
    return 0;
}