• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Low Power RF & Wireless Connectivity » Low Power RF Proprietary Software & SimpliciTI Forum » CC1110, Sleep, and Sleep Timer
Share
Low Power RF & Wireless Connectivity
  • Forums
  • Announcements
  • Files
  • E2E Wiki
Options
  • Subscribe via RSS

Forums

CC1110, Sleep, and Sleep Timer

This question is not answered
Jonathan4030
Posted by Jonathan4030
on Aug 15 2008 14:31 PM
Prodigy20 points

I have had difficulty getting the CC1110's sleep timer to function.  Thus far I've only concerned myself with PM0/PM1 as to avoid the infamous errata.  Using DN106 as a guide, I've pieced together the following minimum test case.  It's Figure 3 from DN106 inside a loop that flips a pin each pass through.  If working properly, I should see the pin alternate back and forth; however, the processor never awakes from sleep (verified in the debugger) in either PM0 or PM1.  I'm at a loss for where the problem lies

The hardware in question is a custom CC1110 board.  Radio and GPIO functions are all working properly.  There is no external 32kHz crystal installed, so I'm trying to run off the internal RC oscillator.  Single stepping in the debugger shows the count registers of the sleep timer to be incrementing (implying the sleep timer is running).

void main(void) {
  // Initialize hardware
  char temp = WORTIME0;
  CLKCON  = 0xB9; // TICKSPD = fRef/128;  CLKSPD = fRef/2; Use Crystal
                  // TICKSPD = 187.5 kHz; CLKSPD = 12 MHz
  while(!(SLEEP & 0x40));
  SLEEP |= 0x04;

  // Interface controls
  LED     = LED_OFF;
  P0DIR  |= LED_MASK;

  for(;;) {
    // Go to sleep
    SLEEP = (SLEEP & 0xFC) | 0x01;
    asm("NOP");
    asm("NOP");
    asm("NOP");
    if(SLEEP & 0x03) {
      WORCTL |= 0x04;         // Reset Sleep Timer
      temp = WORTIME0;        // Wait until a postitive 32 kHz edge
      while(temp == WORTIME0);
      temp = WORTIME0;        // Wait until a postitive 32 kHz edge
      while(temp == WORTIME0);
      WOREVT1 = 0x10;
      WOREVT0 = 0x00;
      PCON |= 0x01;           // Enter PM
      asm("NOP");
    }
   
    // Flip LED
    LED = !LED;
  }
}
cc1110
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Kjetil
    Posted by Kjetil
    on Aug 15 2008 17:40 PM
    Genius17695 points

    Hi Jonathan, 

    You will need to enable the sleep timer interrupt in order to get the CPU to wake up from power modes. 

    Enable Sleep Timer interrupt and Global Interrupt by setting IEN0 = 0xA0;
    You will also need to add an Sleep Timer interrupt vector where you make sure you clear the interrupt flag.

    --
    PS. Thank you for clicking  Verify Answer  if this answered your question!

    cc1110 Sleep Timer
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jonathan4030
    Posted by Jonathan4030
    on Aug 18 2008 09:50 AM
    Prodigy20 points

    I guess I'll close this with my results (so it's available for searching later).  Adding the obvious fix (makes me feel a little silly), I can get it to wake up from PM0 but not PM1.  Adding around the SLEEP |= 0x40 line:

      while(!(SLEEP & 0x40));
      SLEEP |= 0x04;

      WORIRQ |= 0x10;
      STIE = 1;
      EA = 1;

    And an interrupt vector:

    #pragma vector = ST_VECTOR
    static __interrupt void SleepTimer(void) {
      STIF = 0;
    WORIRQ &= 0xFE;
      SLEEP &= 0xFC;
    }

    The system will wake up from PM0 and operate properly; however, in PM1 it will wake up exactly once and then stay permanently asleep the next pass through the loop.  This appears to be because it reenters sleep before the crystal oscillator stabilizes (a setting retained during the sleep).  Adding a pre-sleep delay (such as timered PM0 sleep) or switching over the the HS RCOSC seems to fix that.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • RF4ALL
    Posted by RF4ALL
    on Aug 21 2008 16:50 PM
    Prodigy280 points

    Hi,

    Try replace your xtal monitor instruction as follows:

    /*while(!(SLEEP & 0x40));*/
    while(CLKCON & 0x40);

    This will monitor [CLKCON.OSC] to ensure that the [HS XOSC] is not only stable,
    but also actually applied as system clock source before continuing code execution.


    Cheers,
    RF4ALL

    cc1110 CC2430 CC2511 CC1111 CC2510 CC2431 System Clock Cource HS XOSC Stable CLKCON
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use