USB Serial component and hibernation | Cypress Semiconductor
USB Serial component and hibernation
I'm having a ton of issues getting power consumption during hibernate down to reasonable values on our first PSOC product using a CY8C528LTI-030. The example project in AN77900 is extremely simplistic, having only an LCD component, a couple of PWMs and no interrupts, so it wasn't that helpful for my project with many components, 10 interrupt handlers, an eeprom, USB serial, and an ADC with analog multiplexers.
I've managed to get consumption down to a 1.3 mA by sleeping or stopping all components, clearing all pending interrupts and stopping them and then calling CyPmSaveClocks then CyHibernate. Static current with power off is around 300 microamps, meaning the active circuitry is still pulling around a milliamp.
I'm suspicious of the USB serial port component as the source, since the D+ and D- pins are remaining at 3.3V even after Stop() has been called on the component. I grounded the pin via a resistor to verify the pin came back up to 3.3V.
Another possible source is the analog side - there is no API generated for analog pins so I can't manipulate them into a HI-Z state (I use 5 analog pins to multiplex to an ADC). I did call DisconnectAll() on the multiplexers. I modified the hardware to make sure there was no voltage on these pins and I did see a reduction in hibernate current.
This component has been the source of many issues - something about the power detection pin kept waking the part out of hibernate (pulling 18mA) - I only managed to stop that behavior by turning off VBUS detection on the component and manually starting/stopping on my own.
Another thing I've noticed in this project is that CY_PSOC5_ES1 is defined, even though I'm pretty sure this part shouldn't be engineering silicon. The conditional compiles in a lot of the system API have stuff like #if(CY_PSOC5_ES1) which I don't think should be called, which might be the source of my problems.
If I could get some clarification on whether the ES1 macro should be defined and any issues with the USB serial component during hibernate, or if there is some other API I need to call (CySpcSetActivePower(0) ?) I'd appreciate it.