Hello,
I am looking to add power management to my application with a CC3200. My application has a main loop that I execute every 100ms to handle local updates, and is sending data over WiFi every 30s. I simply want to put the processor to sleep for 100ms in-between these loops to save power. From my research, it seems that LPDS is what I want, but I'm having trouble bringing code from the idle_profile example into my code (note I am using FreeRTOS).
I have read documentation, browsed the forums, and looked through several SDK examples(power_measurement, idle_profile, idle_profile_nonos), but still do not have a good grasp of how to implement sleep. From my understanding, TI recommends using the Power Management Framework (PMF) found in the SDK’s “middleware” library rather than following the PRCM API found in the CC3200 Technical Reference Manual. This makes sense, but I am having trouble finding documentation/API on how to implement the PMF.
Can you point me towards any documentation outside of the above mentioned examples and this wiki link: http://processors.wiki.ti.com/index.php/CC32xx_Power_Management_Framework?
Here are some of the questions that seem to have fallen in the gaps between all the various documentation I've read:
- Is TI’s recommendation to copy files from idle_profile into the example (lp3p0_board.c, lp3p0_plat_ops.c, and user_app_config.h)? Is there any further information on what should be customized within these files?
- What is the difference between using API set_rtc_as_wk_src and idle profile’s SetTimerAsWkUp (this calls cc_rtc_set, cc_timer_create, and cc_timer_start)? Which should be used?
- What makes the application go to “vApplicationIdleHook”? (This is where idle_profile calls cc_idle_task_pm). Where does code resume after exiting this hook?
- Does the osi_Sleep(x) function have any relation to the application processor’s low power mode? Or is it only the rtc/gpio/host irq that control when the processor will exit low power mode?
- Is it possible to use rtc as wakeup source without modifying the RTC value? I am using RTC to keep real-time (NTP), and I don’t want to affect this counter when entering low power mode.
- My understanding is the network processor’s power mode is completely separate from PMF. It seems the only control for network processor is the sl_WlanPolicySet(SL_POLICY_PM ,xxxx,…) function. Is this correct? If so, is there any detailed documentation on differences between ‘Normal’, ‘Low Power’, and ‘Long Interval’ options? (I can only find that they are options, not what they actually do)
- Where does PMF handle the CPU/Peripheral context save/restore and how much RAM is retained? I’d like to better understand what default settings are so I know what I need to do in addition to what PMF already handles (e.g. GPT, ADC, I2C, and global variables/RAM addresses).
I am hoping this thread can clear up my questions and also serve as a go-to reference for others trying to implement sleep with the CC3200.
Kind Regards,
-Jon