cancel
Showing results for 
Search instead for 
Did you mean: 

eMMC can't enter sleep mode

dylanou
Associate III

Hi,

STM32U585 + eMMC , by SDMMC2 bus

I want to configure the eMMC into sleep mode by HAL_MMC_SleepDevice API,but It does not work

It alway return 0 when I get the card state by HAL_MMC_GetCardState after run the API HAL_MMC_SleepDevice.

dylanou_0-1719213094173.png

dylanou_1-1719213219941.png

Thanks!

 

 

 

2 REPLIES 2
Saket_Om
ST Employee

Hello @dylanou 

 

You would typically need to ensure that:

The eMMC device supports the sleep command (CMD5).
The SDMMC peripheral is properly configured.
The correct sequence of commands is being sent to the eMMC device.
The hardware connections are correct and stable.
The clock settings and power supply are configured according to the eMMC device specifications

If your question is answered, please close this topic by clicking "Accept as Solution".

Thanks
Omar
STeve D
Associate II

Hi dylanou,

Did you solve this problem?  I'm seeing the same behavior and not finding the accepted solution especially helpful.

The HAL_MMC_SleepDevice command is not returning any errors, and the state changes are exactly as you show in your post.  Within the sleepDevice command there is a sleep_timeout field that I don't completely understand.  Does the solution have to do with disabling this timeout?

Thanks for any help,

Steve

To answer the other comments:

  • The eMMC device supports the sleep command (CMD5). yes
  • The SDMMC peripheral is properly configured. yes
  • The correct sequence of commands is being sent to the eMMC device. Using the HAL_MMC_SleepDevice command, so I assume so? Any extra info on what the correct sequence entails would be helpful.
  • The hardware connections are correct and stable. yes
  • The clock settings and power supply are configured according to the eMMC device specifications. yes