• 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 » Microcontrollers » Stellaris® ARM® Microcontrollers » Stellaris® ARM® LM3S Microcontrollers Forum » LM3S2B93 Hibernation Module
Share
Stellaris® ARM® Microcontrollers
  • Forum
Options
  • Subscribe via RSS
Helpful Stellaris® LM4F Series Links
  • LM4F Series
  • Stellaris PinMux Utility
  • Stellaris® LM4F120 LaunchPad
  • LM4F MCU Applications
  • LM4F MCU Video
  • ARM Cortex-M4F Whitepaper
  • Stellaris MCU Brochure
  • LM4F232 Eval Kit
  • LM3S2B93 Hibernation Module

    LM3S2B93 Hibernation Module

    This question is not answered
    David Escandon
    Posted by David Escandon
    on May 07 2012 18:51 PM
    Expert2125 points

    TI Team,

    Can you confirm whether or not the LM3S3B93 has a faulty Hibernation module? The errata indicates that writing to certain hibernation registers will fail due to a system clocking issue. (see link below) It also states the the silicon version that is affected is "C5." Below are the part markings on the devices I use. Can you confirm that this issue would indeed appear on my device.

    I'm simply attempting to use the RTC, but I cannot write the RTCEN bit of the HIBCTL register.

    Errata Link

    http://www.ti.com/lit/er/spmz638a/spmz638a.pdf

    Part Markings

    LM3S2B93
    IQC80C5SD
    $A-18P001H

    If the hibernation module is faulty, that okay as long as I can use the RTC. In this event, how do I enable the RTC? I don't care if I go into hibernation. Also, what other information do you need to determine what the problem is. I'd like to run my RTC code on the evaluation board, but I don't have one. I can send this to you if you need it.

    -David

    LM3S2B93 RTC Fail Hibernation
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Erick Macias
      Posted by Erick Macias
      on May 08 2012 12:45 PM
      Intellectual1860 points

      Hello David,

      The LM3S2B93 IQC80C5SD will have the "Write to certain hibernation modules register sometimes fail" errata. Have you tried the workaround provided in the Errata ?

      The data sheet provides the steps required to initialize the hibernate RTC (no hibernation) in page 303.

      RTC Match Functionality LM3S2B93 Data Sheet: http://www.ti.com/lit/gpn/lm3s2b93#page=303

      Also, the LM3S2B93 timers (A/B) can be used in RTC mode. For more information how to enable this feature see the Data Sheet in page 559.

      David Escandon

      Also, what other information do you need to determine what the problem is. I'd like to run my RTC code on the evaluation board, but I don't have one.

      What problem are your referring to in your comment above?

      The LM3S9B92 Evaluation Kit can be used to test the RTC features.

      LM3S9B92 Evaluation Kit: http://www.ti.com/tool/ek-lm3s9b92

      Let me know if you have additional questions.

      - Erick

      ---------------------------------------------------------------------------------------------------------
      Please click the Verify Answer
      button on this post if it answers your question.
      ---------------------------------------------------------------------------------------------------------

      LM3S9B92 LM3S2B93 RTC Module
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Erick Macias
      Posted by Erick Macias
      on May 08 2012 15:30 PM
      Intellectual1860 points

      Hello David,

      The LM3S9B92 Evaluation Kit I suggested above does not have the hibernation module, instead you would have to use the LM3S9B90 Evaluation Kit.

      LM3S9B90 Evaluation Kit: http://www.ti.com/tool/ek-lm3s9b90 

      I'm sorry for the confusion.

      Let me know if you have any questions.

      Regards

      - Erick

      ---------------------------------------------------------------------------------------------------------
      Please click the Verify Answer
      button on this post if it answers your question.
      ---------------------------------------------------------------------------------------------------------

      LM3S9B90
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • David Escandon
      Posted by David Escandon
      on Jun 25 2012 11:30 AM
      Expert2125 points

      Erick,

      Over the last month, 'we've conducted several tests on our production boards to test the functionality of the hibernation module. We need not only need the RTC to work--this requires the hibernation module to function--but we also need to device to enter hibernation to meet our final application requirements. Again, let me stress that the operation of the hibernation module is an absolute necessity.

      We are using the LM3SB93 device, but have experienced a 20% failure rate with the parts we ordered from an authorized distributor. The failure, as explained in the previous thread, is seen across all the devices with C5 silicon (see attached table) with the exception of 1. To understand the nature of the failure, we tried a few different options listed below:

      • Ordered the LM3SD93 device and ran the same software to test the operation of the hibernation module
      • We tested 1 devices, and it  worked. The version of silicon, A2, is the same (see attached table)
      • Parts were sampled directly from Texas Instruments
      • Ordered the LM3SU93 device and ran the same software to test the operation of the hibernation module
      • We tested 3 devices, and one failed. The version of silicon, A2, is the same (see attached table)
      • Parts were sampled directly from Texas Instruments
      • Tested the golden file on 3 different LM3SB90 evaluation modules with mixed results. The part markings of the device point to non-production silicon. Of the three boards that were tested, only 1 worked

      With the failures spread across 3 different compatible parts, as well as the three separate evaluation modules of the same family, we are concerned that this issue is something new and has not been addressed on the latest errata. We are now working with the local TI sales group to have the original LM3SB93 undergo a failure analysis. Even so, we our deadline looming here in the next wee, we need the factory to provide guidance on how we should proceed with dealing with the problem. I'm also attaching a copy of the "golden file" that we have used for our testing.

      Again, I can't stress enough the importance of getting answers from the factory about the nature of this failure. A workaround to this problem is imperative. We are open to any suggestions you may have. Thanks for your help.

      -David

      Golden File

      #include "inc/zero_types.h"
      #include "inc/hw_types.h"
      #include "inc/hw_hibernate.h"
      #include "driverlib/sysctl.h"
      #include "driverlib/systick.h"
      #include "driverlib/hibernate.h"
      #include "driverlib/interrupt.h"

      static u32 hibernate_request_seconds = 0;

      static void ZeroMcuHibernateIntHandler( void )
      {
      u32 status;

      // Clear the interrupt
      status = HibernateIntStatus( 0 );
      HibernateIntClear( status );

      // If the hibernate request variable has been set to a value other
      // than zero, it means a hibernation was requested. Here in the ISR,
      // since the RTC had to have just incremented to get us here, we are
      // safe to adjust the hibernation match register, so we do that.
      // Then we set the hibernate request variable back to 0 to signal to the function
      // which set it, that we're now ready to enter hibernation.
      if( hibernate_request_seconds != 0 )
      {
      HibernateRTCMatch0Set( HibernateRTCGet() + hibernate_request_seconds );
      hibernate_request_seconds = 0;
      }
      // Otherwise, set us up for another interrupt in 1 second.
      else
      {
      HibernateRTCMatch0Set( HibernateRTCGet() + 1 );
      }
      }


      int main( void )
      {
      u32 status;

      ///////////////// Configure System Clock //////////////////

      SysCtlClockSet( SYSCTL_SYSDIV_10 |
      SYSCTL_USE_PLL |
      SYSCTL_OSC_MAIN |
      SYSCTL_XTAL_16MHZ );

      ///////////////////// Configure RTC ///////////////////////

      SysCtlPeripheralEnable( SYSCTL_PERIPH_HIBERNATE );
      // Ensure 5 clock cycles pass after enabling peripherals
      SysCtlDelay( 2 );

      HibernateEnableExpClk(SysCtlClockGet());

      SysCtlDelay( SysCtlClockGet() / (50/3) ); // wait 20ms
      HibernateClockSelect( HIBERNATE_CLOCK_SEL_DIV128 );
      SysCtlDelay( SysCtlClockGet() / (50/3) ); // wait 20ms

      HibernateRTCEnable();

      HibernateRTCSet( 0 );

      /////////////////////// Test RTC /////////////////////////

      while( 1 )
      {
      if( HibernateRTCGet() != 0 )
      {
      break;
      }
      SysCtlDelay( SysCtlClockGet() / 300 ); // wait 10ms
      }


      /////////////////////// Configure Hibernate /////////////////////////

      // According to the stellaris errata, we need to ensure that we never write to
      // hibernation module registers HIBRTCC, HIBRTCM0, HIBRTCM1, HIBRTCLD, HIBRTCT, or HIBDATA
      // at the time that the RTC counter increments. Since this is an initialization routine,
      // we dont mind disabling the RTC for moment to perform the configuration.
      HibernateRTCDisable();

      // Register the interrupt handler function
      HibernateIntRegister( ZeroMcuHibernateIntHandler );

      // Clear the interrupt
      status = HibernateIntStatus( 0 );
      HibernateIntClear( status );

      // Set to interrupt once per second. Due to the errata mentioned above,
      // this will allow us to do any configuration of the hibernate module inside
      // the ISR which, since the ISR only executes immediatly after an RTC counter increment,
      // virtually guarantees the RTC will not be incrementing.
      HibernateRTCMatch0Set( HibernateRTCGet() + 1 );

      IntMasterEnable();
      HibernateIntEnable( HIBERNATE_INT_RTC_MATCH_0 );

      // Re-enable RTC after configuration is done.
      HibernateRTCEnable();


      ///////////////////////// Test Hibernate ///////////////////////////

      hibernate_request_seconds = 10;

      // Wait for ISR to set the wake up value for us.
      while( hibernate_request_seconds != 0 );

      // Set up the wake condition.
      HibernateWakeSet( HIBERNATE_WAKE_RTC );

      //Hibernate!
      HibernateRequest();
      while( 1 );

      return( 0 );

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Erick Macias
      Posted by Erick Macias
      on Jun 26 2012 15:12 PM
      Intellectual1860 points

      Hello David,

      Thank you for the detailed write up. I can't see anything particulary wrong with the initialization of the hibernation module.

      What board are you currently using to test the different chips, to replicate your setup on my end? If the board is a custom PCB can you provide the schematics?

      Did you purchase the ek-lm3s9b90 I recommended before to test the hibernation? If yes, have you tested the golden code in this kit?

      Regards,

      Erick

      ---------------------------------------------------------------------------------------------------------
      Please click the Verify Answer
      button on this post if it answers your question.
      ---------------------------------------------------------------------------------------------------------

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • David Escandon
      Posted by David Escandon
      on Jun 26 2012 15:56 PM
      Expert2125 points

      Erick,

      I used three different LM3SB90 evaluation boards to verify the "golden" file. The part marking on all three boards is: LM3S9B90IQC80B1DA0948BP078

      Again, the resultst were mixed with only one of three boards working.

      I will send you the schematics later today. Thanks for your help.

      -David

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • David Escandon
      Posted by David Escandon
      on Jun 26 2012 18:31 PM
      Expert2125 points

      Erick,

      Please provide your email address. I don't want to post the schematic file on this public forum. Thanks.

      -David

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • David Escandon
      Posted by David Escandon
      on Jun 28 2012 17:41 PM
      Expert2125 points

      Erik,

      Per our conversation this morning, I'm sending you a link to the RTC oscillator that has worked using all three version of the Stellaris device in question. Let me elaborate more on our testing with the RTC oscillator:

      In an effort to get the hibernation circuit to work using an external crystal, we tried two smaller values for C1 and C2, 12pF and 8pF, on two different boards that were both failing previously (a B93 and a U93)..  Neither value seemed to help the oscillator start on those boards, which again is not consistent with what is published on the errata as a viable workaround.

      At this point, we tried wiring up a 32.768KHz oscillator to the B93, and that worked. We changed the initialization API for the clock source, but the RTC and hibernation modules worked on 5 different boards (two boards had a B93; 2 had U93, and 1 had a D93).

      Thus, we have what we think is a working solution using an external oscillator, but we still need confirmation from the factory as to why the external circuit will not work all of the time. We'd prefer using the crystal because it is lower cost, so we'd still like to know definitively why the problem exists int he first place.

      On that note, the part number of the 32.768KHz is ECS-327SMO-TR. http://www.ecsxtal.com/store/pdf/ecs-327smo.pdf

      The golden file with the change is posted below:

      #include "zero_types.h"
      #include "inc/hw_types.h"
      #include "inc/hw_hibernate.h"
      #include "driverlib/sysctl.h"
      #include "driverlib/systick.h"
      #include "driverlib/hibernate.h"
      #include "driverlib/interrupt.h"

      static u32 hibernate_request_seconds = 0;

      static void ZeroMcuHibernateIntHandler( void )
      {
      u32 status;

      // Clear the interrupt
      status = HibernateIntStatus( 0 );
      HibernateIntClear( status );

      // If the hibernate request variable has been set to a value other
      // than zero, it means a hibernation was requested. Here in the ISR,
      // since the RTC had to have just incremented to get us here, we are
      // safe to adjust the hibernation match register, so we do that.
      // Then we set the hibernate request variable back to 0 to signal to the function
      // which set it, that we're now ready to enter hibernation.
      if( hibernate_request_seconds != 0 )
      {
      HibernateRTCMatch0Set( HibernateRTCGet() + hibernate_request_seconds );
      hibernate_request_seconds = 0;
      }
      // Otherwise, set us up for another interrupt in 1 second.
      else
      {
      HibernateRTCMatch0Set( HibernateRTCGet() + 1 );
      }
      }


      int main( void )
      {
      u32 status;

      ///////////////// Configure System Clock //////////////////

      SysCtlClockSet( SYSCTL_SYSDIV_10 |
      SYSCTL_USE_PLL |
      SYSCTL_OSC_MAIN |
      SYSCTL_XTAL_16MHZ );

      ///////////////////// Configure RTC ///////////////////////

      SysCtlPeripheralEnable( SYSCTL_PERIPH_HIBERNATE );
      // Ensure 5 clock cycles pass after enabling peripherals
      SysCtlDelay( 2 );

      HibernateEnableExpClk(SysCtlClockGet());

      SysCtlDelay( SysCtlClockGet() / (50/3) ); // wait 20ms
      //HibernateClockSelect( HIBERNATE_CLOCK_SEL_DIV128 );
      HibernateClockSelect( HIBERNATE_CLOCK_SEL_RAW );
      SysCtlDelay( SysCtlClockGet() / (50/3) ); // wait 20ms

      HibernateRTCEnable();

      HibernateRTCSet( 0 );

      /////////////////////// Test RTC /////////////////////////

      while( 1 )
      {
      if( HibernateRTCGet() != 0 )
      {
      break;
      }
      SysCtlDelay( SysCtlClockGet() / 300 ); // wait 10ms
      }


      /////////////////////// Configure Hibernate /////////////////////////

      // According to the stellaris errata, we need to ensure that we never write to
      // hibernation module registers HIBRTCC, HIBRTCM0, HIBRTCM1, HIBRTCLD, HIBRTCT, or HIBDATA
      // at the time that the RTC counter increments. Since this is an initialization routine,
      // we dont mind disabling the RTC for moment to perform the configuration.
      HibernateRTCDisable();

      // Register the interrupt handler function
      HibernateIntRegister( ZeroMcuHibernateIntHandler );

      // Clear the interrupt
      status = HibernateIntStatus( 0 );
      HibernateIntClear( status );

      // Set to interrupt once per second. Due to the errata mentioned above,
      // this will allow us to do any configuration of the hibernate module inside
      // the ISR which, since the ISR only executes immediatly after an RTC counter increment,
      // virtually guarantees the RTC will not be incrementing.
      HibernateRTCMatch0Set( HibernateRTCGet() + 1 );

      IntMasterEnable();
      HibernateIntEnable( HIBERNATE_INT_RTC_MATCH_0 );

      // Re-enable RTC after configuration is done.
      HibernateRTCEnable();


      ///////////////////////// Test Hibernate ///////////////////////////

      hibernate_request_seconds = 10;

      // Wait for ISR to set the wake up value for us.
      while( hibernate_request_seconds != 0 );

      // Set up the wake condition.
      HibernateWakeSet( HIBERNATE_WAKE_RTC | HIBERNATE_WAKE_PIN );

      //Hibernate!
      HibernateRequest();
      while( 1 );

      return( 0 );
      }

       -David

      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