MX25L4006E SPI flash current consumption

We use IMP003 and have MX25L4006E connected to the dedicated SPI FLASH pins. And it is powered through the switch that enables power to the radio. Is it true that the IMP OS puts flash into deep sleep when flash is not active? And that the current is 0uA when WLAN_POWER_EN is low? When is IMP OS powering the flash memory?

The imp autodetects whether the SPI flash is in the radio domain (ie behind the radio power switch) by checking the nCS line when the power gate is off.

If this is high with the radio off, it assumes the SPI flash is powered on the MCU domain.

If this is low, then it assumes the SPI is behind the radio power gate, and turns on the radio power then re-checks the nCS line.

If this is still low, it decides the SPI flash is broken :wink:

Moral of the story: pull nCS up to the SPI power domain.

If the flash is in the radio domain, and the radio is off, then spiflash.enable will power it up and disable will power it down. There is some leakage into the radio when the power gate is on (~40uA as I remember).

I want to increase battery life. Two questions:

  1. does IMP OS put spi flash to deep power down (0.6uA) when not used? Or does it remain standby (13uA)?
  2. spiflash.enable() function suggest that wifi is ON. Is the current ~40uA or 8-250mA?

The imp does not use “deep power down” or any particular power-saving mode on SPI flashes (are the commands even standardised?).

When powered-on but not in active use, the SPI flash will be idle with nCS high, so according to the MX25L4006E datasheet it will be in “standby” mode at <25uA. Deep power-down is quoted as 5-10uA, so any savings might be less dramatic than you think.


Note BTW that if spiflash.enable() is in effect, that means that the imp itself is running (i.e., is not in deep-sleep). So the 40uA used by the inactive wifi chip, let alone the 20uA difference in SPI power usage, is lost in the noise compared to the 4-5mA that the CPU is using at that point. If you’ve connected the flash to the radio power domain, it will be 0uA while the imp is in deep-sleep, so you’re already doing the best thing for long-term power consumption.