hi all,
we need optimal the power comsumption with the pheripheral .
(ie . use button to trigger led or buzzer in no RF work)
i think that Sensor Controller module should be do it .
so ,about the Sensor Controller which have some question need clear.
1. Sensor Controller
ref,CC13xx, CC26xx SimpleLink Wireless MCU Technical Reference Manual) 1.3.10 Sensor Controller
Sensor Controller that is work in the power down mode .
how to vertifcation the action and let system in to power down mode ?
2.integrating "LED Blinker" project into SampleSwitch project,
in my platform ,it show a warning about the linker : how to solve it ? it information overlap in the vector .
"Warning[Lp023]: absolute placement (in [0x20000000-0x200000c7]) overlaps with reserved areas: C:\ti\simplelink\zstack_home_1_02_02a_44539\Projects\zstack\HomeAutomation\SampleSwitch\CC26xx\cc26xx_app.icf 178"
void ctrlReadyCallback(void) { } // ctrlReadyCallback void taskAlertCallback(void) { // Clear the ALERT interrupt source scifClearAlertIntSource(); if (scifGetTaskIoStructAvailCount(SCIF_LED_BLINKER_TASK_ID, SCIF_STRUCT_OUTPUT) == 1) { SCIF_LED_BLINKER_OUTPUT_T* pOutput = scifGetTaskStruct(SCIF_LED_BLINKER_TASK_ID, SCIF_STRUCT_OUTPUT); if (pOutput->counter & 0x0001) { HWREG(GPIO_BASE + GPIO_O_DOUTSET31_0) = BV(Board_LED1); } else { HWREG(GPIO_BASE + GPIO_O_DOUTCLR31_0) = BV(Board_LED1); } if (pOutput->counter & 0x0002) { HWREG(GPIO_BASE + GPIO_O_DOUTSET31_0) = BV(Board_LED2); } else { HWREG(GPIO_BASE + GPIO_O_DOUTCLR31_0) = BV(Board_LED2); } scifHandoffTaskStruct(SCIF_LED_BLINKER_TASK_ID, SCIF_STRUCT_OUTPUT); } // Acknowledge the alert event scifAckAlertEvents(); } // taskAlertCallback Void taskFxn2(UArg a0, UArg a1) { PRCMPowerDomainOn(PRCM_DOMAIN_PERIPH); PRCMLoadSet(); while (PRCMPowerDomainStatus(PRCM_DOMAIN_PERIPH) != PRCM_DOMAIN_POWER_ON); // Enable the GPIO module PRCMPeripheralRunEnable(PRCM_PERIPH_GPIO); PRCMPeripheralSleepEnable(PRCM_PERIPH_GPIO); PRCMPeripheralDeepSleepEnable(PRCM_PERIPH_GPIO); PRCMLoadSet(); while (!PRCMLoadGet()); // In this example, we keep the AUX domain access permanently enabled scifOsalEnableAuxDomainAccess(); // Initialize and start the Sensor Controller scifOsalRegisterCtrlReadyCallback(ctrlReadyCallback); scifOsalRegisterTaskAlertCallback(taskAlertCallback); scifInit(&scifDriverSetup); scifStartRtcTicksNow(0x00010000 / 128); IntMasterEnable(); AONRTCEnable(); // Main loop while (1) { // Start the LED blinker task? if (!(HWREG(GPIO_BASE + GPIO_O_DIN31_0) & BV(Board_KEY_SELECT))) { if (scifStartTasksNbl(BV(SCIF_LED_BLINKER_TASK_ID)) == SCIF_SUCCESS) { scifWaitOnNbl(42); } // Debounce the button CPUdelay((100 * 1000 * 48) / 3); while (!(HWREG(GPIO_BASE + GPIO_O_DIN31_0) & BV(Board_KEY_SELECT))); CPUdelay((100 * 1000 * 48) / 3); // Stop the LED blinker task? } } } Void main() { .......... Task_Params_init(&taskParams2); taskParams2.stack = myTaskStack2; taskParams2.stackSize = MY_TASK_STACK_SIZE; taskParams2.priority = 2; Task_construct(&myTask2, taskFxn2, &taskParams2, NULL); BIOS_start(); /* enable interrupts and start SYS/BIOS */ }
platform:
IAR ARM 7.40
Sensor Controller 1.1.0
H.W :
cc2630 7x7
ref: