File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -259,7 +259,7 @@ static void sdram_init_seq(SDRAM_HandleTypeDef
259259
260260void sdram_enter_low_power (void ) {
261261 // Enter self-refresh mode.
262- // In self-refresh mode the SDRAM retains data with external clocking.
262+ // In self-refresh mode the SDRAM retains data without external clocking.
263263 FMC_SDRAM_DEVICE -> SDCMR |= (FMC_SDRAM_CMD_SELFREFRESH_MODE | // Command Mode
264264 FMC_SDRAM_CMD_TARGET_BANK | // Command Target
265265 (0 << 5U ) | // Auto Refresh Number -1
@@ -276,6 +276,14 @@ void sdram_leave_low_power(void) {
276276 (0 << 9U )); // Mode Register Definition
277277}
278278
279+ void sdram_enter_power_down (void ) {
280+ // Enter power-down mode.
281+ FMC_SDRAM_DEVICE -> SDCMR |= (FMC_SDRAM_CMD_POWERDOWN_MODE | // Command Mode
282+ FMC_SDRAM_CMD_TARGET_BANK | // Command Target
283+ (0 << 5U ) | // Auto Refresh Number -1
284+ (0 << 9U )); // Mode Register Definition
285+ }
286+
279287#if __GNUC__ >= 11
280288// Prevent array bounds warnings when accessing SDRAM_START_ADDRESS as a memory pointer.
281289#pragma GCC diagnostic push
Original file line number Diff line number Diff line change @@ -13,5 +13,6 @@ void *sdram_start(void);
1313void * sdram_end (void );
1414void sdram_enter_low_power (void );
1515void sdram_leave_low_power (void );
16+ void sdram_enter_power_down (void );
1617bool sdram_test (bool exhaustive );
1718#endif // __SDRAM_H__
You can’t perform that action at this time.
0 commit comments