2022-10-19 09:49 AM
If no SDRAM (disabled), enter standby mode always work as expected.
When SDRAM enabled, sometime enter standby mode, draw 3mA more than usual.
This is code to put SDRAM to self refresh mode before enter standby:
````
sdramState.command.CommandMode = FMC_SDRAM_CMD_SELFREFRESH_MODE;
sdramState.command.CommandTarget = FMC_SDRAM_CMD_TARGET_BANK1;
sdramState.command.AutoRefreshNumber = 1;
sdramState.command.ModeRegisterDefinition = 0;
return (HAL_SDRAM_SendCommand(&sdramState.hsdram, &sdramState.command, SDRAM_TIMEOUT) == HAL_OK);
````
Also, standby mode no need SDRAM remain data, is there any better way to shutdown SDRAM completely?
Is FMC_SDRAM_CMD_POWERDOWN_MODE better? when I tried seem no different between FMC_SDRAM_CMD_POWERDOWN_MODE and FMC_SDRAM_CMD_SELFREFRESH_MODE
2022-10-19 05:14 PM
2022-10-20 08:29 AM
Thanks, that link would help.
For my issue, I need to make all SDRAM pin input before entering standby mode, the problem seems gone.
2022-10-20 05:29 PM
Except for backup domain, the Standby mode looses/resets all of the configuration, including the GPIO. An additional consumption of a few mA is described in my article. Read it and implement the code!