Place PSoC 4 BLE, PRoC BLE, and EZ-BLE Modules in Stop Mode - KBA218957

Version: **

 

Question:

How do you place PSoC 4 BLE, PRoC BLE, and EZ-BLE modules in Stop mode?

 

Answer:

For PSoC 4 BLE and PRoC BLE devices, Stop mode offers the lowest possible current consumption. All peripherals are disabled, and SRAM and register states are not retained. The device pins are “frozen” and retain their drive modes and logic states.

 

There are two Stop mode wakeup sources:

 

  • Dedicated WAKEUP pin
  • XRES

 

Triggers on either of these pins cause a system reset. When using the XRES trigger, all states including frozen I/Os are lost and the reset cause cannot be determined.

 

PSoC 4 BLE and PRoC BLE devices have pin P2[2] as the dedicated WAKEUP pin. To enter Stop mode, the CySysPmStop() API must be used. Before entering Stop mode, it is necessary to configure the input wakeup polarity of the dedicated WAKEUP pin using the CySysPmSetWakeupPolarity() API. The wakeup polarity is active LOW by default.

 

When the processor encounters the CySysPmStop() API in your code, it checks if the state of the WAKEUP pin matches the wakeup polarity set by the CySysPmSetWakeupPolarity() API. If the polarity matches, then the device does not enter Stop mode and code execution continues. To ensure that the device enters Stop mode, make sure that the state of the WAKEUP pin is opposite to the wakeup polarity set by the API.

 

If PSoC 4 BLE and PRoC BLE have the P2[2] pin, follow these steps to put the device into Stop mode:

 

  1. Place a digital input pin in the PSoC Creator TopDesign.
  2. Rename it to WAKEUP and make changes to the Drive mode and Initial drive state (if necessary).
  3. Configure P2[2] as the WAKEUP pin in the Pins tab of the .cydwr file.
  4. In your application, set the wakeup polarity to be opposite to the default state of the WAKEUP pin, using the CySysPmSetWakeupPolarity() API.
  5. Use the CySysPmStop() API to put the device into Stop mode.

    2.png

    Even if the PSoC 4 BLE or PRoC BLE module does not have the P2[2] pin, it is still necessary to set the wakeup polarity to be the opposite of the pin’s state. You can follow this procedure if your BLE module does not have P2[2]:

     
    1. Do not place a digital input pin in the TopDesign for WAKEUP.
    2. Include the following code snippet in your application:  

      1.png