2012-12-26 01:24 AM
Interrupts:
Tick (timer) � for the OS (FreeRtos) Call the xPortSysTickHandlerDMA transfer for the camera Clear ISR Start camera taskADC complete for the ADC Clear ISR Start ADC taskTasks:
Camera task Disable the DCMI Set a flag to indicate that there is a new frameADC task Disable ADC Set a flag to indicate that there is a new valueBackground task Check the flags to find out if there is any data to save (flags from the two above tasks). Is so, save to file and readable DCMI and ADC Set a delay for the background task (vTaskDelay) The go to sleepThis is how the background task looks like:while(1) { //check for new data from the camera or ADC Background_OP(); //set a small delay for this task vTaskDelay(40); //ZZZ... __WFI(); }}Everything works fine but I'm not sure about the sleep mode. Is this the way to use __WFI() function? Is there a better way to handle power consumption? #stm32-power-management #low-power2012-12-26 02:19 AM
Hi Daniel,
To enter the Sleep mode, you can use __WFI or __WFE commands. So what you do should be OK. Then, to know the better ways to handle power consumption, you can refer to the AN3430 throw this link: . It provides some tricks to optimize the power consumption when F2 devices are used. Let me know if this was helpful for you. Cheers, STOne-32