2019-01-07 03:46 AM
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).
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;
}
2019-01-09 08:22 PM
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.
2019-01-11 12:38 AM
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 :
Best Regards,
Mohamed Aymen.
2019-01-12 10:46 AM
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.
2019-01-16 06:36 AM
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.