diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-04-08 12:42:54 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-04-08 12:42:54 -0600 |
commit | 5a0874108c6dd02b943a954c6ce9bebf1549d7f4 (patch) | |
tree | eeb0924e9d2e57d63e86e33feb34a9c4b346ccf8 | |
parent | 66a5658034ad8cb36a834ebb9eb4bf741560eb43 (diff) | |
download | px4-nuttx-5a0874108c6dd02b943a954c6ce9bebf1549d7f4.tar.gz px4-nuttx-5a0874108c6dd02b943a954c6ce9bebf1549d7f4.tar.bz2 px4-nuttx-5a0874108c6dd02b943a954c6ce9bebf1549d7f4.zip |
SAMV71-XULT: Update SDRAM refresh rate based on latest softpack
-rw-r--r-- | nuttx/configs/samv71-xult/src/sam_sdram.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nuttx/configs/samv71-xult/src/sam_sdram.c b/nuttx/configs/samv71-xult/src/sam_sdram.c index 7cbb4b4f5..b43a306f8 100644 --- a/nuttx/configs/samv71-xult/src/sam_sdram.c +++ b/nuttx/configs/samv71-xult/src/sam_sdram.c @@ -49,6 +49,7 @@ #include <debug.h> #include <nuttx/arch.h> +#include <arch/board/board.h> #include "up_arch.h" @@ -300,7 +301,8 @@ void sam_sdram_config(void) * For IS42S16100E, 2048 refresh cycle every 32ms, every 15.625 usec */ - putreg32(1562, SAM_SDRAMC_TR); + regval = (32 * (BOARD_MCK_FREQUENCY / 1000)) / 2048 ; + putreg32(regval, SAM_SDRAMC_TR); regval = getreg32(SAM_SDRAMC_CFR1); regval |= SDRAMC_CFR1_UNAL; |