Not sure the exact reason.
How about CE219881_PowerModes example code in PSoC Creator? Does it work?
Kindly follow its user guide. It requires some steps for hardware setup.
Thanks Ryan, I haven't tested PowerModes but will give it a shot and report back!!
Unfortunately it still looks really bad on the supply side. The PowerModes code runs fine as can be seen in the screenshot where the "ADC" graphs show the core voltage (3.3V setting) and the core current in deep sleep, then active, low-power active, active again and finally deep sleep again.
The issue is the 30-or-so odd mA consumed somewhere else, as can be seen in the current measurement at the Vin terminals (graphs named Main Voltage/Current) in this case, battery terminals show very similar waveforms.
I couldn't find any special hardware setup steps in the user guide CE219881.pdf that was installed as part of the example project (Document number 002-19881 Rev.*A)?