cancel
Showing results for 
Search instead for 
Did you mean: 

Is the 4mA increase in current consumption expected when we just enable the wide bus operation in uSD card via SDMMC interface in STM32 MCU?

HP.15
Associate II

In a product which requires power consumption to be minimum as possible, we are employing a STM32L496 as MCU. In recent days, we were trying to bring down the power consumption of the overall device. We observed that immediately after enabling the wide bus operation using the HAL function in uSD card, the current consumed increases by ~4mA. (uSD card is attached when this function is called).

  1. Is this current increase expected?
  2. Is there anything wrong in the below provided sequence of initializing the SDMMC interface and uSD card?

Kindly please help us to analyze the issue and bring down the current consumed if this is not expected increase.

Details:

----------

MCU : STM32L496

Core supply : External SMPS (1.2V).

Core frequency : 20 MHz

SDMMC pin configuration:

-------------------------------------

All data pins, command and clock pins are in alternate function push pull mode with no internal pull up. External clamp IC (ECLAMP2410P) is used in between the SDMMC interface and uSD card connector.

SDMMC init code:

-------------------------

uint8_t sd_init(void)
{
  uint8_t sd_state = MSD_OK;
 
  /* uSD device interface configuration */
  g_uSd_handle.Instance = SDMMC1;
  g_uSd_handle.Init.ClockEdge           = SDMMC_CLOCK_EDGE_RISING;
  g_uSd_handle.Init.ClockBypass         = SDMMC_CLOCK_BYPASS_DISABLE;
  g_uSd_handle.Init.ClockPowerSave      = SDMMC_CLOCK_POWER_SAVE_ENABLE;
  g_uSd_handle.Init.BusWide             = SDMMC_BUS_WIDE_1B;
  g_uSd_handle.Init.HardwareFlowControl = SDMMC_HARDWARE_FLOW_CONTROL_ENABLE;
  g_uSd_handle.Init.ClockDiv            = SDMMC_TRANSFER_CLK_DIV;
 
  /* Msp SD initialization */
 
  /* HAL SD initialization */
  if (HAL_SD_Init(&g_uSd_handle) != HAL_OK)
  {
    sd_state = MSD_ERROR;
  }
 
// Current increase is observed after the execution of below code segment  
 
 
  /* Configure SD Bus width */
  if (sd_state == MSD_OK)
  {
    /* Enable wide operation */
    if (HAL_SD_ConfigWideBusOperation(&g_uSd_handle, SDMMC_BUS_WIDE_4B) != HAL_OK)
    {
      sd_state = MSD_ERROR;
    }
    else
    {
      sd_state = MSD_OK;
    }
  }
 
  return  sd_state;
}

4 REPLIES 4
HP.15
Associate II

Observation:

After intiailizing the SD card, if you do a dummy write to the SD card, the current consumption is coming down. i.e., Card will no longer take the initial extra current taken, if the card is written and kept idle.

Mohamed Aymen HZAMI
ST Employee

Hello,

the increase of the current consumption is expected because you changed the bus wide communication with SDcard from 1-bus wide to 4-bus wide and this increase in performance which provide more current consumption.

 To do a test-case, I need to know more information :

  • are you using your own PCB or an ST board ?
  • how you measured the current consumption

Best Regards,

Mohamed Aymen.

We are using our own PCB.

We are measuring the current by connecting the ammeter in series to the power supply for the board. To power the SD card a 3.3V buck boost converter is used.

However, interestingly the current comes down if we do a write to the SD card after the initialisation. If this write is not performed, the initial increase in current remains.

Mohamed Aymen HZAMI
ST Employee

Hello,

I've already tested on an STM32L4 eval-board and it works well, the current increase only in micro-seconds.

In this case you must verify your PCB board.

Best Regards,

Mohamed Aymen.