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;
}
}