File tree Expand file tree Collapse file tree 4 files changed +16
-5
lines changed
boards/daisy_seed_with_sdram Expand file tree Collapse file tree 4 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 66#include STM32_HAL_H
77
88#include "supervisor/board.h"
9+ #include "supervisor/stm.h"
910#include "sdram.h"
1011
11- extern void port_add_sdram_to_heap (void );
1212
1313/** SDRAM banks configuration. */
1414static const struct stm32_sdram_bank_config bank_config [] = {
@@ -38,7 +38,7 @@ static const struct stm32_sdram_bank_config bank_config[] = {
3838/* SDRAM configuration. */
3939static const struct stm32_sdram_config config = {
4040 .sdram = FMC_SDRAM_DEVICE ,
41- .power_up_delay = 0 ,
41+ .power_up_delay = 100 ,
4242 .num_auto_refresh = 8 ,
4343 .mode_register = SDRAM_MODEREG_BURST_LENGTH_4 |
4444 SDRAM_MODEREG_BURST_TYPE_SEQUENTIAL |
@@ -56,5 +56,5 @@ static const struct stm32_sdram_config config = {
5656void board_init (void ) {
5757 sdram_init (& config );
5858// sdram_test(true);
59- port_add_sdram_to_heap ();
59+ stm_add_sdram_to_heap ();
6060}
Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ static void sdram_init_seq(const struct stm32_sdram_config *config) {
144144 command .CommandMode = FMC_SDRAM_CMD_CLK_ENABLE ;
145145 HAL_SDRAM_SendCommand (& hsdram , & command , HAL_MAX_DELAY );
146146
147- HAL_Delay (100 );
147+ HAL_Delay (config -> power_up_delay );
148148
149149 /* Configure a PALL (precharge all) command */
150150 command .CommandMode = FMC_SDRAM_CMD_PALL ;
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ void NVIC_SystemReset(void) NORETURN;
4343
4444#if (CPY_STM32H7 ) || (CPY_STM32F7 )
4545#if defined(CIRCUITPY_HW_SDRAM_SIZE )
46+ #include "stm.h"
4647#include "sdram.h"
4748#include <stdbool.h>
4849#include <stddef.h>
@@ -184,7 +185,7 @@ void port_heap_init(void) {
184185 // heap init in _port_heap_init called from port_init
185186}
186187
187- void port_add_sdram_to_heap (void ) {
188+ void stm_add_sdram_to_heap (void ) {
188189 size_t sdram_memory_size = sdram_size ();
189190 pools [1 ] = tlsf_add_pool (_heap , sdram_start (), sdram_memory_size );
190191}
Original file line number Diff line number Diff line change 1+ // This file is part of the CircuitPython project: https://circuitpython.org
2+ //
3+ // SPDX-FileCopyrightText: Copyright (c) 2025 snkYmkrct
4+ //
5+ // SPDX-License-Identifier: MIT
6+
7+ #pragma once
8+
9+
10+ void stm_add_sdram_to_heap (void );
You can’t perform that action at this time.
0 commit comments