-- A little background --
We are having a problem with our product that uses a PSoC 5lp. Here is a little history of our product. We have been using the CY8C5267LTI-LP89 in our product for about 2 years. Since then we have had 5 different board spins. The latest board spin is drawing too much in low power mode, which I believe to be uncovering some "best practices" we were not following. Our previous boards were drawing ~200uA in low power mode ( measured input power. A little high, but not the biggest fish to fry. Started around 80uA and then crept up to 220uA). Our current board starts around 600uA and then creeps up to about 2-3mA. In order to preserve our IP I can not upload a project, or code, but I can provide snippits.
Here is what we do for low power mode ( with respect to the mcu)
- Put all components to sleep
- CyPmSleep(PM_SLEEP_TIME_NONE, PM_SLEEP_SRC_PICU | PM_SLEEP_SRC_CTW );
Then wake up we
- wake up all components
Most of the GPIO is either analog input or digital out (strong drive) I did find ~5 pins that were digital high impedance pins.
Currently the Debug Select is set to SWD + SWV.
I've spent a ton of time debugging this, but here are some key points
- I have verified that MCU is infact going to sleep based on the current spike that I see every second ( based on waking up each cycle of the CTW)
- I have tried setting those 5 digital pins to analog high z during sleep mode, to no change in power consumption.
- I created a blank project and only added 3 pins ( needed to turn off power rails on our board) and tried setting it to sleep. This dropped down to ~80uA and crept up to ~200uA. (Debug Select was set to SWD + SWV)
- I redid step 3, but set Debug Select to GPIO. Power draw was at ~80uA and stayed there ( no creeping for 10 minutes)
- I was not able to set Debug Select to GPIO in our current project. That option is not even there.
I'm leaning towards the power creep being related to the Debug Select. Because of the creep, I can not accurately gauge how much more power this board version is drawing. So it could be that setting those 5 pins to analog high z did in fact help, but because of the creep I am unable to confirm that.
Under what circumstances will GPIO NOT be an option for Debug Select? The only difference (major difference) I can see is that we have a separate bootloader project and our main project has a bootloadable component. What other steps can I take to set the Debug Select to GPIO?