Skip to content

Commit 4950195

Browse files
authored
Update SDRAM refresh rate calculation
1 parent 9082fb2 commit 4950195

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/stm32System/stm32FMC.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ static void MX_FMC_Init(void)
153153
/* Step 8: Set the refresh rate counter - refer to section SDRAM refresh timer register in RM0455 */
154154
/* Set the device refresh rate
155155
* COUNT = [(SDRAM self refresh time / number of row) x SDRAM CLK] – 20
156-
= [(64ms/8192) * 143.3333MHz] - 20 = 1099. */
156+
= [(64ms/8192) * 150MHz] - 20 = 1151.875 ~ 1152. */
157157
if (HAL_SDRAM_ProgramRefreshRate(&_hsdram1, 1152) != HAL_OK)
158158
{
159159
Error_Handler();
@@ -680,4 +680,4 @@ extern "C" void MDMA_IRQHandler()
680680
{
681681
HAL_MDMA_IRQHandler(&_hmdmaMdmaChannel40Sw0);
682682
HAL_MDMA_IRQHandler(&_hmdmaMdmaChannel41Sw0);
683-
}
683+
}

0 commit comments

Comments
 (0)