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 6
6
#include STM32_HAL_H
7
7
8
8
#include "supervisor/board.h"
9
+ #include "supervisor/stm.h"
9
10
#include "sdram.h"
10
11
11
- extern void port_add_sdram_to_heap (void );
12
12
13
13
/** SDRAM banks configuration. */
14
14
static const struct stm32_sdram_bank_config bank_config [] = {
@@ -38,7 +38,7 @@ static const struct stm32_sdram_bank_config bank_config[] = {
38
38
/* SDRAM configuration. */
39
39
static const struct stm32_sdram_config config = {
40
40
.sdram = FMC_SDRAM_DEVICE ,
41
- .power_up_delay = 0 ,
41
+ .power_up_delay = 100 ,
42
42
.num_auto_refresh = 8 ,
43
43
.mode_register = SDRAM_MODEREG_BURST_LENGTH_4 |
44
44
SDRAM_MODEREG_BURST_TYPE_SEQUENTIAL |
@@ -56,5 +56,5 @@ static const struct stm32_sdram_config config = {
56
56
void board_init (void ) {
57
57
sdram_init (& config );
58
58
// sdram_test(true);
59
- port_add_sdram_to_heap ();
59
+ stm_add_sdram_to_heap ();
60
60
}
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) {
144
144
command .CommandMode = FMC_SDRAM_CMD_CLK_ENABLE ;
145
145
HAL_SDRAM_SendCommand (& hsdram , & command , HAL_MAX_DELAY );
146
146
147
- HAL_Delay (100 );
147
+ HAL_Delay (config -> power_up_delay );
148
148
149
149
/* Configure a PALL (precharge all) command */
150
150
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;
43
43
44
44
#if (CPY_STM32H7 ) || (CPY_STM32F7 )
45
45
#if defined(CIRCUITPY_HW_SDRAM_SIZE )
46
+ #include "stm.h"
46
47
#include "sdram.h"
47
48
#include <stdbool.h>
48
49
#include <stddef.h>
@@ -184,7 +185,7 @@ void port_heap_init(void) {
184
185
// heap init in _port_heap_init called from port_init
185
186
}
186
187
187
- void port_add_sdram_to_heap (void ) {
188
+ void stm_add_sdram_to_heap (void ) {
188
189
size_t sdram_memory_size = sdram_size ();
189
190
pools [1 ] = tlsf_add_pool (_heap , sdram_start (), sdram_memory_size );
190
191
}
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