Flash Erase Suspend

Hi,

I am using nRF5340-DK board and nRF Connoect SDK 1.9.1.

It takes ~20mA average for 30ms to erase one page of the external flash (Find below the power profiler screenshot)

The amount of power drawn for this duration of time is problematic for our custom hardware limitations.

Therefore, we are looking for ways to distribute this power consumption over a longer time, potentially dividing it to multiple smaller chunks.

There is an "Erase Suspend" command of the external flash, but I can not see any API functions of this in Zephyr.

Is there an implementation I can use of erase suspend with Zephyr?

Are there any other ways to distribute this page erase power consumption over a longer period of time?

Thank you.

  • I'm a bit confused as the maximum current consumption of the mx25r64 flash device on the nRF5340 while erasing should be 3.1mA typ and 6mA max. Are you using the on-board mx25r64? 

    In order to support more flash opcodes you need to expand drivers/flash/spi_nor.c. Se f.ex. spi_nor_cmd_write().

  • My apologies haakonsh. I've been taking measurements with our custom board as well as nRF5340-DK board and I messed up the measurement screenshots.

    So below is the single page erase power measurement I've taken, using our custom FW on the nRF5340-DK board. The average current is 7.9mA, but the baseline current was around 0.7mA, so if we deduct that, it takes 7.2mA for 65mS to erase 1 page of flash.

    We also have our own custom board which uses MX66L1G45G AS THE FLASH CHIP. When I measure the erase page power consumption with the same FW, I get 19.5mA for ~29mS. Screenshot below.

    Erase page peak power drawing characteristics are much different to each other. When I check the datasheets of the flash chips, erase currents seems to be same. Is such a difference normal?

    Kind Regards,

     

  • From the MX66L1G45G datasheet chapter 9-41. Erase Suspend: 
    "If the system issues an Erase Suspend command after the sector erase operation has already begun, the device will not enter Erase-Suspended mode until tESL has elapsed."

    Looks like you won't be able to lower power peaks with Erase Suspend unless you are erasing multiple sectors, but then you could also just erase one sector at a time without using the Erase Suspend feature. 

    As for the difference in current consumption I assume to be attributed to the different operating voltages and sector erase times: ~7mA for 65ms @1.8V vs ~19mA for 30ms @3.3V.

    As for mitigating the load peaks with regard to your power supply I think you need to consider adding a small supercap to your power supply. 

  • Thanks haakonsh.


    After a few days of fiddling around I finally get erase suspend/resume working properly.

    It works within a sector erase as well.

Related