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.

RTOS/CC2650: stack size error in cc2650 launcpad

Part Number: CC2650

Tool/software: TI-RTOS

Hi,

I am using cc2650 launchpad for development, in that i used simple_peripheral as example.  everything worked fine but when i included blink led operation in this example, code get complied but over the launch board led blink operation does not perform well. 

I included led blink function in SimpleBLEPeripheral_taskFxn() in for(;;) loop, when i perform this code led blink for 2-3 time after that it does not blink. So i changed task stack size(3024) as well as run time stack size(2024) also(took random values- i tried with low values first), but for every value of combinations same kind of output seen.

code format:

==========

static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1)
{
// Initialize application
SimpleBLEPeripheral_init();

// Application main loop
for (;;)
{

doWork();

CPUdelay(24e6);     .........................................

//Led_Blink Function

void doWork(void)
{

PIN_setOutputValue(ledPinHandle, Board_LED0, 1);
CPUdelay(24e6);
PIN_setOutputValue(ledPinHandle, Board_LED0, 0);

}

Is there any kind of stack overflow problem or something else?

2) after hit scan key in BLE_Device _Monitor i am able to see simple peripheral in device list but when i hit connect key that time i get following error-

GAP Link Established : Status=18 h=0000

& this error comes with all provided examples in sdk (ble_sdk_2_02_01_18).

what kind of error is this?

Thank you.

  • Hi Gaurav,

    This problem appears for all projects after you attempted to add the red led functionality to a single example? This is definitely odd if this is the case.

    Please start fresh - uninstall SDK and reinstall. Verify that simple_peripheral works. Then step by step, starting from simple_peripheral, tell us exactly what files you modify and where.

    I know it sounds tedious, but I'm sure we can figure out what's going on

    Regards,
    Rebel
  • Hi,

    This problem appeared before doing any changes. I have already discussed as well as share code for it other ti member. 

    I will do the uninstall part at my side. but you haven't spoken about 1st problem. what is solution for such kind of issues?

    Thank you.

  • Hi,

    Instead of doing what you did, can you create a periodic timer and then post a LED blink event when the timer times out?
    To check if it stack overflow issue, you can follow our software developer's guide section 9.5