Other Parts Discussed in Thread: SIMPLELINK-CC13X2-26X2-SDK
Hi folks,
I am developing a low-power project on the CC26x2R1 launchpad with the Sensor Controller Studio (2.7.0.155) and Code Compositor Studio (9.3.0.00012). I have modified the LaunchPad + ULP Sense Booster Pack example project, "Capacitive Touch" with the following code to ensure reliable capacitive sensing. I would like to take this project a step further by generating an interrupt from the SCS. This interrupt would be handled by the user application and shall notify the user that the battery is too low for the device to operate.
|
U16 voltage;
if (voltage > VADC_COUNT_2V85) { // Clear Critical Battery Flag // Run Capacitive Sensor Sampling } else { // Set Critical Battery Flag // Alert the User Application } |
I read the sensor controller studio documentation on "fwGenAlertInterrupt()" and "fwGenQuickAlertInterrupt()" and believe that I would need to use the former in this case.
The following code exists within the User Application (where the SCS and User Application interface is coded) and handles MCU wake-up from capacitive sensor input via "fwSwitchOutputBuffer()"
|
void scTaskAlertCallback(void) { // Wake up the OS task } // scTaskAlertCallback |
Q: It is possible to generate a specialized interrupt?
Q: Am I better off modifying my User Application to check the value of "Output->BatteryCriticalAlert" to handle the condition?
Thank you,
Ken