CC2541 Low power consumption

Source: Internet
Author: User

void Osal_pwrmgr_powerconserve (void) {   uint32 next;   halintstate_t intstate;     if (pwrmgr_attribute.pwrmgr_device! = pwrmgr_always_on)//Determine if low-power mode     {              if (pwrmgr_attribute.pwrmgr_task_) is turned on state = = 0)   //Judgment task of <span style= "font-family:arial, Helvetica, Sans-serif;" Whether the >pwrmgr_task_state is 0</span>           {                     hal_enter_critical_section (intstate);                 Next = Osal_next_timeout ();                 Hal_exit_critical_section (intstate);                 Osal_set_cpu_into_sleep (next); Enter low-Power Program}}}        
The above is CC2541 into the low-power program:

1. Line set power_saving, so that the value of Pwrmgr_attribute.pwrmgr_device is not equal to pwrmgr_always_on

2. Call Osal_pwrmgr_task_state (uint8 task_id, uint8 State), the state is set to Pwrmgr_conserve, the corresponding task_id corresponding to the PWR The one in Mgr_task_state is set to 0.

This basically goes into low power.




Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

CC2541 Low power consumption

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.