Skip to main content
Explorer
June 24, 2024
Question

eMMC can't enter sleep mode

  • June 24, 2024
  • 2 replies
  • 1452 views

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!

 

 

 

    This topic has been closed for replies.

    2 replies

    Technical Moderator
    June 28, 2024

    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

    Visitor II
    December 11, 2024

    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