Translation - Japanese: PSoC 4 BLE、PRoC BLE、およびEZ-BLEモジュールをストップモードにする - KBA218957 - Community Translated (JA)
How do you place PSoC 4 BLE, PRoC BLE, and EZ-BLE modules in Stop mode?
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
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 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 pin, follow these steps to put the device into Stop mode:
- Place a digital input pin in the PSoC Creator TopDesign.
- Rename it to WAKEUP and make changes to the Drive mode and Initial drive state (if necessary).
- Configure P2 as the WAKEUP pin in the Pins tab of the .cydwr file.
- In your application, set the wakeup polarity to be opposite to the default state of the WAKEUP pin, using the CySysPmSetWakeupPolarity() API.
- Use the CySysPmStop() API to put the device into Stop mode.
Even if the PSoC 4 BLE or PRoC BLE module does not have the P2 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: