the hunt for esp32-s3 deep sleep current leakage
Posted: Fri Feb 17, 2023 3:43 am
Hello again. I am designing what will be a high-volume product that is based on the ESP32-S3-WROOM-1-N8R2.
The design has relatively complex firmware, and a fairly simple hardware design of just a regulator and a couple simple i2c peripherals.
It is existential that the design is able to achieve reasonably low current draw in its 'active idle' state, which involves putting the ESP32 in deep sleep while the ESP32 powers-down the peripherals. The target budget is approx 10uA for the entire module.
I am reasonably experienced at low power design, and the typical things that one runs into when designing for boards that operate in the 5-10uA range. In the past I've mostly used stm32l4's, and this is my first experience trying to do a low-power design with the esp32.
With that as background, I've just done my first spin and I'm having significant challenges. The purpose of this note is NOT to try to get you to do my job. But if you can point me in the right direction through hints or elimination, it will save me a lot of time and I would deeply appreciate it.
My hardware design uses a variety of non-RTC GPIOs to control the mosfets that gate power to the peripherals, and it uses RTC GPIOs for the inputs that must cause wakeup from deep sleep. Before entering deep sleep, my firmware ensures that all the non-RTC GPIOs use "hold" to keep outputs configured as low, high, or 'floating' (disabled) as appropriate, and that all the RTC GPIO inputs are configured appropriately. (Happy to supply details if this matters.)
My firmware requires retaining deep sleep state in the 8kb RTC ram. I am a straight (if large) esp-idf app. I built the hardware with a 32Khz crystal and use a combination of the RTC timer and the RTC gpio's to wake up either by timer or by external event.
Finally, I'll say that going into deep sleep, coming out of deep sleep, etc., is working perfectly.
However, when in deep sleep the best current draw I can achieve is about 970µA, which is of course insanely high given that the datasheet (4.4 Table 12) says that 8µA should be my expectation with RTC memory and peripherals enabled as they are.
I have spent two solid days trying to verify that all the peripherals are truly powered off, and that there is no leakage through the obvious paths of pulldowns and whatnot. When I measure voltages on the pins of the module, the only pins where I see any voltage at all are 3V3, EN, and IO0, as it should be. All UART and I2C pins are disabled/floating and there are no external pullups.
And so ... the simple question for you is ... is there something obvious that I'm missing here in terms of calls that I need to make to shut off some internal power domains, etc., that would account for the stray ~950µA current draw? Anything related to the radio? JTAG?
If this were 5-10uA I was hunting for, it's a hunt that I'm super familiar with. But this level is kind of crazy.
Any ideas would be greatly appreciated. Thanks.
The design has relatively complex firmware, and a fairly simple hardware design of just a regulator and a couple simple i2c peripherals.
It is existential that the design is able to achieve reasonably low current draw in its 'active idle' state, which involves putting the ESP32 in deep sleep while the ESP32 powers-down the peripherals. The target budget is approx 10uA for the entire module.
I am reasonably experienced at low power design, and the typical things that one runs into when designing for boards that operate in the 5-10uA range. In the past I've mostly used stm32l4's, and this is my first experience trying to do a low-power design with the esp32.
With that as background, I've just done my first spin and I'm having significant challenges. The purpose of this note is NOT to try to get you to do my job. But if you can point me in the right direction through hints or elimination, it will save me a lot of time and I would deeply appreciate it.
My hardware design uses a variety of non-RTC GPIOs to control the mosfets that gate power to the peripherals, and it uses RTC GPIOs for the inputs that must cause wakeup from deep sleep. Before entering deep sleep, my firmware ensures that all the non-RTC GPIOs use "hold" to keep outputs configured as low, high, or 'floating' (disabled) as appropriate, and that all the RTC GPIO inputs are configured appropriately. (Happy to supply details if this matters.)
My firmware requires retaining deep sleep state in the 8kb RTC ram. I am a straight (if large) esp-idf app. I built the hardware with a 32Khz crystal and use a combination of the RTC timer and the RTC gpio's to wake up either by timer or by external event.
Finally, I'll say that going into deep sleep, coming out of deep sleep, etc., is working perfectly.
However, when in deep sleep the best current draw I can achieve is about 970µA, which is of course insanely high given that the datasheet (4.4 Table 12) says that 8µA should be my expectation with RTC memory and peripherals enabled as they are.
I have spent two solid days trying to verify that all the peripherals are truly powered off, and that there is no leakage through the obvious paths of pulldowns and whatnot. When I measure voltages on the pins of the module, the only pins where I see any voltage at all are 3V3, EN, and IO0, as it should be. All UART and I2C pins are disabled/floating and there are no external pullups.
And so ... the simple question for you is ... is there something obvious that I'm missing here in terms of calls that I need to make to shut off some internal power domains, etc., that would account for the stray ~950µA current draw? Anything related to the radio? JTAG?
If this were 5-10uA I was hunting for, it's a hunt that I'm super familiar with. But this level is kind of crazy.
Any ideas would be greatly appreciated. Thanks.