stm32/boards: Swap FMC banks on ARDUINO_GIGA and ARDUINO_PORTENTA_H7.

Swap FMC banks to remap the SDRAM bank1 address to 0x60000000.  Arduino's
M4 firmware uses address 0x60000000 by default.  When the elf loader tries
to load that it will fail because by default NOR/PSRAM is mapped at that
address, not SDRAM bank1.  (Note that the region at 0xC0000000 has an XN
attribute by default, so switching the M4 firmware address will not work.)

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
This commit is contained in:
iabdalkader
2024-07-19 18:56:36 +03:00
committed by Damien George
parent 70a7e0ff2f
commit a3100be4b2
2 changed files with 2 additions and 0 deletions

View File

@@ -226,6 +226,7 @@ extern struct _spi_bdev_t spi_bdev;
#define MICROPY_HW_SDRAM_SIZE (64 / 8 * 1024 * 1024) // 64 Mbit
#define MICROPY_HW_SDRAM_STARTUP_TEST (1)
#define MICROPY_HW_SDRAM_TEST_FAIL_ON_ERROR (true)
#define MICROPY_HW_FMC_SWAP_BANKS (1)
// Timing configuration for 200MHz/2=100MHz (10ns)
#define MICROPY_HW_SDRAM_CLOCK_PERIOD 2

View File

@@ -240,6 +240,7 @@ extern struct _spi_bdev_t spi_bdev;
#define MICROPY_HW_SDRAM_SIZE (64 / 8 * 1024 * 1024) // 64 Mbit
#define MICROPY_HW_SDRAM_STARTUP_TEST (1)
#define MICROPY_HW_SDRAM_TEST_FAIL_ON_ERROR (true)
#define MICROPY_HW_FMC_SWAP_BANKS (1)
// Timing configuration for 200MHz/2=100MHz (10ns)
#define MICROPY_HW_SDRAM_CLOCK_PERIOD 2