cancel
Showing results for 
Search instead for 
Did you mean: 

EMMC and power consumption

MK..1
Associate III

Hi

I have a custom board with an EMMC connected STM32F446.

My write access to EMMC for 16 kbytes is quite fast (2-3 ms). EMMC during the write operation consumes some 50 milli ampere more than during the its idle state. This would be fine, but as far as I see the EMMC consume this 50 ma for about 800 ms.

So again my write operation takes 2-3 ms, but emmc is wasting power for 800 ms.

What can I do? Shall I send a slee cmd?

apparently there is no sleep cmd in the driver?

From the STM32H7 repository I see these 2 functions:

HAL_StatusTypeDef HAL_MMC_AwakeDevice(MMC_HandleTypeDef *hmmc);
HAL_StatusTypeDef HAL_MMC_SleepDevice(MMC_HandleTypeDef *hmmc)

Why arer they not there in the f4 code?

Thx

4 REPLIES 4
Pavel A.
Evangelist III

eMMC has internal controller that may keep doing something long after the CPU moved the data. Do you see the same prolonged power consumption for reads?

 

>>Why are they not there in the f4 code?

eMMC was not popular in F4 designs, and certainly ST didn't deliver any boards using eMMC. Most of us had to write our own drivers or back-port the things we needed.

eMMC / MicroSD cards have a lot going on behind the scenes, they manage the NAND array, wear leveling, and dealing with the much larger erase block sizes, probably at least 128 KB, for each sector or bytes within a sector that you change. There really isn't a modify-in-place here, an erased block need to be found, and the original content and your new data spliced together. That it goes off and lazy writes once you've stopped moving isn't all that surprising.

 

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..

@Tesla DeLoreando you think implementing these 2 cmds will help:?

HAL_StatusTypeDef HAL_MMC_AwakeDevice(MMC_HandleTypeDef *hmmc);
HAL_StatusTypeDef HAL_MMC_SleepDevice(MMC_HandleTypeDef *hmmc)

Tomorrow I will have a look at what happens with read access.

Thx

@Pavel A. 

>>Do you see the same prolonged power consumption for reads?

no reading data does not causeprolonged power consumption.