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?
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).
- Is this current increase expected?
- 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;
}