I can't seem to get the fwGenAlertInterrupt(); command to trigger the callback function scTaskAlertCallback(void).
I have debugged the sensor controller application using the sensor controller studio. I made sure that the execution flows to the fwGenAlertInterrupt();.
But when debugging the application, I never hit a breakpoint inside of scTaskAlertCallback(void)
In my app (simpleBLEPeripheral.c) I have:
#include "scif.h"
...
// SensorController Callbacks
void scTaskAlertCallback(void) {
// Set the driver pins to high-z mode
//PIN_close(&sbpPins);
PINCC26XX_setOutputEnable(Board_LED1, FALSE);
PINCC26XX_setOutputEnable(Board_LED2, FALSE);
PINCC26XX_setOutputEnable(Board_LED3, FALSE);
PINCC26XX_setOutputEnable(Board_LED4, FALSE);
scifClearAlertIntSource();
} // taskAlertCallback
void scCtrlReadyCallback(void) {
} // ctrlReadyCallback
...
Initialization called from SimpleBLEPeripheral_init:
// Initialize the Sensor Controller
scifOsalInit();
scifOsalRegisterCtrlReadyCallback(scCtrlReadyCallback);
scifOsalRegisterTaskAlertCallback(scTaskAlertCallback);
scifInit(&scifDriverSetup);
//scifStartRtcTicksNow(0x00010000 / 128); // only need this if using RTC scheduling
// Configure the Sensor Controller
// Sensor task (not to be confused with OS tasks)
scifTaskData.ecdDriver.cfg.adcMax = 2000;
scifTaskData.ecdDriver.cfg.adcMin = 0;
scifTaskData.ecdDriver.cfg.goodEnough = 50;
...
This code is run after a characteristic is changed from SimpleBLEPeripheral_processCharValueChangeEvt
// Set the driver pins to output mode
//hSbpPins = PIN_open(&sbpPins, SBP_configTable_SmartRF06);
PINCC26XX_setOutputEnable(Board_LED1, TRUE);
PINCC26XX_setOutputEnable(Board_LED2, TRUE);
PINCC26XX_setOutputEnable(Board_LED3, TRUE);
PINCC26XX_setOutputEnable(Board_LED4, TRUE);
scifClearAlertIntSource(); // need this here?
// Configure and start the Sensor Controller
// Sensor task (not to be confused with OS tasks)
// scifStartTasksNbl(BV(SCIF_ECD_DRIVER_TASK_ID)); // use this if sensorcontroller task is using RTC scheduling
scifExecuteTasksOnceNbl(BV(SCIF_ECD_DRIVER_TASK_ID)); // just run it once without using RTC scheduling