I'm trying to explore the low power modes of the PSoc4 chip (4100) by cypress. I'm using the $4 dev kit, separated from the USB board. My only connection to the board is 5V power and ground via the J2 connector.
As minimal configuration I have added the P1.6 pin that drives the blue LED on the board and the P0.7 (Wake Up) pin that is connected to the button on the dev board. Th button pin is configured to trigger an interrupt, so it can be used as wake up source for the experiment. Please see the attached picture for details.
I'm measuring the power consumption with amp meter connected serially on the +5V power. My power source is a lab power supply. I wrote a small program that blinks the LED 5 times and puts the device to sleep. I was trying to experiment with the various sleep modes, however for the purpose of this discussion I'm using the "Stop" mode. The SWD port is configured as GPIO to save power.
In the minimal configuration, when the LED is blinking the power consumption goes from 5.6ma to 8.7ma, then when the device goes to sleep the power consumption drops to around 190uA - still pretty high, but withing the tolerances of my measurement device.
When I try to add an I2C master block to the device configuration, the things get weird. My SCB block is named "SCB" and mapped to pins 3.0 and 3.1. When powered on the device consumes about .8ma more, which seems normal, but when going to sleep it now consumes 1.3-1.5ma. The only thing different is the addition of the SCB block. If I add a second SCB block for RS232 mapped to port 4.0 and 4.1 and sleep mode consumption creeps to 2.3-2.8ma.
I can not figure out why the addition of these blocks adds to the power consumption in sleep mode, they are not connected to anything and should not affect the overall power consumption.
This is my minimal configuration:
This is the code that runs on the device:
#include <project.h>
int main()
{
int cnt;
isr_BTN_Start();
isr_BTN_Enable();
CySysPmUnfreezeIo();
#ifdef SCB_SCB_MODE
SCB_Start();
#endif
CyGlobalIntEnable;
for(;;)
{
for(cnt = 0; cnt < 5; cnt++)
{
LED_Write(1);
CyDelay(1000);
LED_Write(0);
CyDelay(1000);
}
#ifdef SCB_SCB_MODE
SCB_Stop();
#endif
CySysPmSetWakeupPolarity(CY_PM_STOP_WAKEUP_ACTIVE_LOW);
CySysPmFreezeIo();
CySysPmStop();
}
}
Th device wakes up when you press the button.