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.

CCS: CC2650 Sensortag reset, start advertising and hardware interrupt

Other Parts Discussed in Thread: CC2650STK, CC2650

Tool/software: Code Composer Studio

I'm using the sensortag_cc2650stk_app with few modifications and have 2 questions concerning the software:

1. I'm debugging the CC2650 Sensortag with the Debugger DevPack. When I start the software from CCS (V8), after few tests, the sensortag starts with the advertising (green LED blinks at 1 Hz).  Is there a possibility to start the software (button press) from new? Because when i pull out the usb cable und power it on from new, the sensortag isn't advertising anymore.

2. I'm using a hardware interrupt. So I call 

  PIN_registerIntCb(hGpioPin, SensorTag_callback);

in the SensorTag_init(void) function. But I want to activate the hardware interrupts after the BLE connection establishment, I tried instead to put the PIN_registerIntCb(hGpioPin, SensorTag_callback) in the SensorTag_processStateChangeEvt(gaprole_States_t newState). So in:

case GAPROLE_CONNECTED:

  PIN_registerIntCb(hGpioPin, SensorTag_callback);

...

But the hardware interrupt isn't working anymore.

This is the callback function:

static void SensorTag_callback(PIN_Handle handle, PIN_Id pinId)
{
switch (pinId)
{
case Board_KEY_LEFT:
SensorTagKeys_processKeyLeft();
break;

case Board_KEY_RIGHT:
SensorTagKeys_processKeyRight();
break;

case Board_RELAY:
SensorTagKeys_processRelay();
break;

// PIN event interrupt 
case Board_PIN0:
SensorTag_clockHandler(SBP_NEW_EVT);
break;


default:
/* Do nothing */
break;
}
}

  • 1. Are you saying you want to revert the project to the default project from the install? Assuming that you haven't modified any linked files, you can always just delete the project from your CCS workspace and re-import it.

    2. I would recommend registering the callback initially as it has originally been done. You can then mask / unmask interrupts as appropriate with PIN_SetConfig(). There is thorough documentation of the PIN driver included with the installer. You can find it by clocking on the pin.h link from $INSTALL$/file:///C:/ble_sdk_source/docs/tidrivers/doxygen/html/index.html