4 Replies Latest reply on Sep 17, 2013 7:25 PM by cy.gul

    PSoC 4 Pioneer Kit Community Project#095 – Hibernate and Stop Power Modes




      In today’s example we are showing users how they can use the PSoC 4 to enter and wake up from hibernate and stop modes. The example also shows the user how to retain SRAM variables in hibernate mode. The project uses the UART which allows the user to send a command to increment a variable, or enter hibernate and stop low power modes. Hibernate and Stop modes can also be entered using the same switch during active mode.


      001 - Schematic Design 1.png


      Forum Post Attachments:


      At the bottom of this post we are including the following items:

      • Example Project Zip File
      • Project Images


      Components Used: 


      The user can download the example project at the bottom of this post. The project uses the following list of Creator Components:

      • UART
      • Comp
      • CyPins
      • ISR
      • Global Signal Reference


      Firmware Description:


      The main.c firmware is included in the example project. Please review the commented sections for more details.


      In the main function, the PSoC 4 checks for the source of reset (Hibernate or Stop) and initializes components accordingly. The example then reads the command from the UART terminal and executes it.


      The example will accept a set of UART commands to perform actions:

      • ‘I’ – Increments the SRAM variable
      • ‘D’ – Decrements the SRAM variable
      • ‘H’ – Enters Hibernate power mode
      • ‘S’ – Enters Stop mode


      The SRAM variable retains its value when it wakes up from hibernate mode and is reset when the device wakes up from Stop mode.


      To enter lower power mode from active mode without using the UART communications follow the wakeup switch procedure for various modes:

      • Press the switch to enter hibernate mode from active mode.
      • Press and hold the switch to enter stop mode from active mode.


      The Lower Power Comparator interrupts are used as wakeup sources to bring back the device from hibernate mode. The dedicated wake-up pin P0.7 is used as a wake-up source to bring back the device from stop mode.


      002 - Hardware Image.png


      Hardware Connections:


      In this example we will need to connect our UART pins from the PSoC 4 P0.4 and P0.5 to the PSoC 5LP P12.6 and P12.7 pins.


      Connect the DC voltage to the inverting terminal of the Low Power Comparator P0.1.


      Connect P1.5 to an oscope.


      003 - Schematic.png


      Test Your Project:


      Program the board and launch the hyperterminal application and begin communicating with the PSoC 4. Use the comparator and push button inputs to control the power modes.


      004 - Hyperterminal Output.png


      I hope this example can help you in your design.