mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 09:50:15 +01:00
stm32/boards/STM32F469DISC: Add new board definition files.
Some checks failed
JavaScript code lint and formatting with Biome / eslint (push) Has been cancelled
Check code formatting / code-formatting (push) Has been cancelled
Check spelling with codespell / codespell (push) Has been cancelled
Build docs / build (push) Has been cancelled
Check examples / embedding (push) Has been cancelled
Package mpremote / build (push) Has been cancelled
.mpy file format and tools / test (push) Has been cancelled
Build ports metadata / build (push) Has been cancelled
alif port / build_alif (alif_ae3_build) (push) Has been cancelled
cc3200 port / build (push) Has been cancelled
esp32 port / build_idf (esp32_build_c2_c5_c6) (push) Has been cancelled
esp32 port / build_idf (esp32_build_cmod_spiram_s2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_s3_c3) (push) Has been cancelled
esp8266 port / build (push) Has been cancelled
mimxrt port / build (push) Has been cancelled
nrf port / build (push) Has been cancelled
powerpc port / build (push) Has been cancelled
qemu port / build_and_test_arm (bigendian) (push) Has been cancelled
qemu port / build_and_test_arm (sabrelite) (push) Has been cancelled
qemu port / build_and_test_arm (thumb_hardfp) (push) Has been cancelled
qemu port / build_and_test_arm (thumb_softfp) (push) Has been cancelled
qemu port / build_and_test_rv32 (push) Has been cancelled
qemu port / build_and_test_rv64 (push) Has been cancelled
renesas-ra port / build_renesas_ra_board (push) Has been cancelled
rp2 port / build (push) Has been cancelled
samd port / build (push) Has been cancelled
stm32 port / build_stm32 (stm32_misc_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_nucleo_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_pyb_build) (push) Has been cancelled
unix port / minimal (push) Has been cancelled
unix port / reproducible (push) Has been cancelled
unix port / standard (push) Has been cancelled
unix port / standard_v2 (push) Has been cancelled
unix port / coverage (push) Has been cancelled
unix port / coverage_32bit (push) Has been cancelled
unix port / nanbox (push) Has been cancelled
unix port / longlong (push) Has been cancelled
unix port / float (push) Has been cancelled
unix port / gil_enabled (push) Has been cancelled
unix port / stackless_clang (push) Has been cancelled
unix port / float_clang (push) Has been cancelled
unix port / settrace_stackless (push) Has been cancelled
unix port / repr_b (push) Has been cancelled
unix port / macos (push) Has been cancelled
unix port / qemu_mips (push) Has been cancelled
unix port / qemu_arm (push) Has been cancelled
unix port / qemu_riscv64 (push) Has been cancelled
unix port / sanitize_address (push) Has been cancelled
unix port / sanitize_undefined (push) Has been cancelled
webassembly port / build (push) Has been cancelled
windows port / build-vs (Debug, true, x64, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Debug, true, x86, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Debug, x64, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Debug, x86, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, true, x64, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, true, x64, dev, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, true, x64, standard, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, true, x64, standard, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, true, x86, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, true, x86, dev, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, true, x86, standard, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, true, x86, standard, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x64, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, dev) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, standard) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, dev) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, standard) (push) Has been cancelled
windows port / cross-build-on-linux (push) Has been cancelled
zephyr port / build (push) Has been cancelled
Python code lint and formatting with ruff / ruff (push) Has been cancelled
Some checks failed
JavaScript code lint and formatting with Biome / eslint (push) Has been cancelled
Check code formatting / code-formatting (push) Has been cancelled
Check spelling with codespell / codespell (push) Has been cancelled
Build docs / build (push) Has been cancelled
Check examples / embedding (push) Has been cancelled
Package mpremote / build (push) Has been cancelled
.mpy file format and tools / test (push) Has been cancelled
Build ports metadata / build (push) Has been cancelled
alif port / build_alif (alif_ae3_build) (push) Has been cancelled
cc3200 port / build (push) Has been cancelled
esp32 port / build_idf (esp32_build_c2_c5_c6) (push) Has been cancelled
esp32 port / build_idf (esp32_build_cmod_spiram_s2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_s3_c3) (push) Has been cancelled
esp8266 port / build (push) Has been cancelled
mimxrt port / build (push) Has been cancelled
nrf port / build (push) Has been cancelled
powerpc port / build (push) Has been cancelled
qemu port / build_and_test_arm (bigendian) (push) Has been cancelled
qemu port / build_and_test_arm (sabrelite) (push) Has been cancelled
qemu port / build_and_test_arm (thumb_hardfp) (push) Has been cancelled
qemu port / build_and_test_arm (thumb_softfp) (push) Has been cancelled
qemu port / build_and_test_rv32 (push) Has been cancelled
qemu port / build_and_test_rv64 (push) Has been cancelled
renesas-ra port / build_renesas_ra_board (push) Has been cancelled
rp2 port / build (push) Has been cancelled
samd port / build (push) Has been cancelled
stm32 port / build_stm32 (stm32_misc_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_nucleo_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_pyb_build) (push) Has been cancelled
unix port / minimal (push) Has been cancelled
unix port / reproducible (push) Has been cancelled
unix port / standard (push) Has been cancelled
unix port / standard_v2 (push) Has been cancelled
unix port / coverage (push) Has been cancelled
unix port / coverage_32bit (push) Has been cancelled
unix port / nanbox (push) Has been cancelled
unix port / longlong (push) Has been cancelled
unix port / float (push) Has been cancelled
unix port / gil_enabled (push) Has been cancelled
unix port / stackless_clang (push) Has been cancelled
unix port / float_clang (push) Has been cancelled
unix port / settrace_stackless (push) Has been cancelled
unix port / repr_b (push) Has been cancelled
unix port / macos (push) Has been cancelled
unix port / qemu_mips (push) Has been cancelled
unix port / qemu_arm (push) Has been cancelled
unix port / qemu_riscv64 (push) Has been cancelled
unix port / sanitize_address (push) Has been cancelled
unix port / sanitize_undefined (push) Has been cancelled
webassembly port / build (push) Has been cancelled
windows port / build-vs (Debug, true, x64, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Debug, true, x86, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Debug, x64, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Debug, x86, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, true, x64, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, true, x64, dev, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, true, x64, standard, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, true, x64, standard, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, true, x86, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, true, x86, dev, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, true, x86, standard, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, true, x86, standard, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x64, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, dev) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, standard) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, dev) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, standard) (push) Has been cancelled
windows port / cross-build-on-linux (push) Has been cancelled
zephyr port / build (push) Has been cancelled
Python code lint and formatting with ruff / ruff (push) Has been cancelled
Signed-off-by: Mike Tolkachev <contact@miketolkachev.dev>
This commit is contained in:
committed by
Damien George
parent
cad9bb3a2b
commit
b4d546d82e
45
ports/stm32/boards/STM32F469DISC/bdev.c
Normal file
45
ports/stm32/boards/STM32F469DISC/bdev.c
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2025 Mike Tolkachev <contact@miketolkachev.dev>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "storage.h"
|
||||
#include "qspi.h"
|
||||
|
||||
#if MICROPY_HW_SPIFLASH_ENABLE_CACHE
|
||||
static mp_spiflash_cache_t spi_bdev_cache;
|
||||
#endif
|
||||
|
||||
// External SPI flash uses QSPI interface
|
||||
const mp_spiflash_config_t spiflash_config = {
|
||||
.bus_kind = MP_SPIFLASH_BUS_QSPI,
|
||||
.bus.u_qspi.data = NULL,
|
||||
.bus.u_qspi.proto = &qspi_proto,
|
||||
#if MICROPY_HW_SPIFLASH_ENABLE_CACHE
|
||||
.cache = &spi_bdev_cache,
|
||||
#endif
|
||||
};
|
||||
|
||||
// SPI flash device instance
|
||||
spi_bdev_t spi_bdev;
|
||||
44
ports/stm32/boards/STM32F469DISC/board_init.c
Normal file
44
ports/stm32/boards/STM32F469DISC/board_init.c
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2025 Mike Tolkachev <contact@miketolkachev.dev>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "py/mphal.h"
|
||||
#include "storage.h"
|
||||
#include "boardctrl.h"
|
||||
#include "qspi.h"
|
||||
|
||||
// Micron N25Q128A13EF840F of original STM32F469I-DISCO board
|
||||
static const mp_spiflash_chip_params_t chip_params_n25q128a13ef840f = {
|
||||
.jedec_id = 0, // Not used for detection
|
||||
.memory_size_bytes_log2 = MICROPY_HW_QSPIFLASH_SIZE_BITS_LOG2,
|
||||
.qspi_prescaler = MICROPY_HW_QSPI_PRESCALER,
|
||||
.qread_num_dummy = MICROPY_HW_QSPIFLASH_DUMMY_CYCLES
|
||||
};
|
||||
|
||||
// Early board initialization hook called before file system is mounted
|
||||
void STM32F469DISC_board_early_init(void) {
|
||||
// Initialize QSPI flash device parameters
|
||||
MICROPY_HW_BDEV_SPIFLASH->spiflash.chip_params = &chip_params_n25q128a13ef840f;
|
||||
}
|
||||
133
ports/stm32/boards/STM32F469DISC/mpconfigboard.h
Normal file
133
ports/stm32/boards/STM32F469DISC/mpconfigboard.h
Normal file
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2025 Mike Tolkachev <contact@miketolkachev.dev>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
// This board is configured to communicate over USB port, not ST-Link
|
||||
|
||||
#define MICROPY_HW_BOARD_NAME "F469DISC"
|
||||
#define MICROPY_HW_MCU_NAME "STM32F469"
|
||||
|
||||
// Use external QSPI flash for storage by default
|
||||
#define MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE (0)
|
||||
|
||||
#define MICROPY_HW_HAS_SWITCH (1)
|
||||
#define MICROPY_HW_HAS_FLASH (1)
|
||||
#define MICROPY_HW_ENABLE_RNG (1)
|
||||
#define MICROPY_HW_ENABLE_RTC (1)
|
||||
#define MICROPY_HW_ENABLE_DAC (1)
|
||||
#define MICROPY_HW_ENABLE_USB (1)
|
||||
#define MICROPY_HW_ENABLE_SDCARD (1)
|
||||
|
||||
#define MICROPY_BOARD_EARLY_INIT STM32F469DISC_board_early_init
|
||||
void STM32F469DISC_board_early_init(void);
|
||||
|
||||
// QSPI flash storage configuration
|
||||
#if !BUILDING_MBOOT
|
||||
#define MICROPY_HW_SPIFLASH_ENABLE_CACHE (1)
|
||||
#endif
|
||||
#define MICROPY_HW_SPIFLASH_SOFT_RESET (1)
|
||||
#define MICROPY_HW_SPIFLASH_SIZE_BITS (128 * 1024 * 1024)
|
||||
#define MICROPY_HW_SPIFLASH_CHIP_PARAMS (1) // enable extended parameters
|
||||
#define MICROPY_HW_QSPI_PRESCALER (3)
|
||||
#define MICROPY_HW_QSPIFLASH_DUMMY_CYCLES (4)
|
||||
#define MICROPY_HW_QSPIFLASH_SIZE_BITS_LOG2 (27)
|
||||
#define MICROPY_HW_QSPIFLASH_CS (pyb_pin_QSPI_CS)
|
||||
#define MICROPY_HW_QSPIFLASH_SCK (pyb_pin_QSPI_CLK)
|
||||
#define MICROPY_HW_QSPIFLASH_IO0 (pyb_pin_QSPI_D0)
|
||||
#define MICROPY_HW_QSPIFLASH_IO1 (pyb_pin_QSPI_D1)
|
||||
#define MICROPY_HW_QSPIFLASH_IO2 (pyb_pin_QSPI_D2)
|
||||
#define MICROPY_HW_QSPIFLASH_IO3 (pyb_pin_QSPI_D3)
|
||||
|
||||
// QSPI flash block device configuration
|
||||
extern const struct _mp_spiflash_config_t spiflash_config;
|
||||
extern struct _spi_bdev_t spi_bdev;
|
||||
#define MICROPY_HW_BDEV_SPIFLASH (&spi_bdev)
|
||||
#define MICROPY_HW_BDEV_SPIFLASH_CONFIG (&spiflash_config)
|
||||
#define MICROPY_HW_BDEV_SPIFLASH_SIZE_BYTES (MICROPY_HW_SPIFLASH_SIZE_BITS / 8)
|
||||
#define MICROPY_HW_BDEV_SPIFLASH_EXTENDED (&spi_bdev) // for extended block protocol
|
||||
|
||||
// HSE is 8MHz
|
||||
#define MICROPY_HW_CLK_PLLM (8)
|
||||
#define MICROPY_HW_CLK_PLLN (336)
|
||||
#define MICROPY_HW_CLK_PLLP (RCC_PLLP_DIV2)
|
||||
#define MICROPY_HW_CLK_PLLQ (7)
|
||||
|
||||
#define MICROPY_HW_FLASH_LATENCY FLASH_LATENCY_6
|
||||
|
||||
// UART config
|
||||
#define MICROPY_HW_UART3_NAME "YB"
|
||||
#define MICROPY_HW_UART3_TX (pin_B10)
|
||||
#define MICROPY_HW_UART3_RX (pin_B11)
|
||||
#define MICROPY_HW_UART6_NAME "YA"
|
||||
#define MICROPY_HW_UART6_TX (pin_G14)
|
||||
#define MICROPY_HW_UART6_RX (pin_G9)
|
||||
#define MICROPY_HW_UART2_NAME "UART2"
|
||||
#define MICROPY_HW_UART2_TX (pin_A2) // Needed to enable AF
|
||||
#define MICROPY_HW_UART2_RX (pin_A3) // Dummy, not routed on PCB
|
||||
#define MICROPY_HW_UART2_CK (pin_A4)
|
||||
|
||||
// I2C buses
|
||||
#define MICROPY_HW_I2C1_SCL (pin_B8)
|
||||
#define MICROPY_HW_I2C1_SDA (pin_B9)
|
||||
|
||||
// SPI
|
||||
#define MICROPY_HW_SPI2_NSS (pin_B9)
|
||||
#define MICROPY_HW_SPI2_SCK (pin_D3)
|
||||
#define MICROPY_HW_SPI2_MISO (pin_B14)
|
||||
#define MICROPY_HW_SPI2_MOSI (pin_B15)
|
||||
|
||||
// CAN buses
|
||||
#define MICROPY_HW_CAN1_TX (pin_B9)
|
||||
#define MICROPY_HW_CAN1_RX (pin_B8)
|
||||
|
||||
// USRSW is pulled low. Pressing the button makes the input go high.
|
||||
#define MICROPY_HW_USRSW_PIN (pin_A0)
|
||||
#define MICROPY_HW_USRSW_PULL (GPIO_NOPULL)
|
||||
#define MICROPY_HW_USRSW_EXTI_MODE (GPIO_MODE_IT_RISING)
|
||||
#define MICROPY_HW_USRSW_PRESSED (1)
|
||||
|
||||
// LEDs
|
||||
#define MICROPY_HW_LED1 (pin_G6) // green
|
||||
#define MICROPY_HW_LED2 (pin_D4) // orange
|
||||
#define MICROPY_HW_LED3 (pin_D5) // red
|
||||
#define MICROPY_HW_LED4 (pin_K3) // blue
|
||||
#define MICROPY_HW_LED_ON(pin) (mp_hal_pin_low(pin))
|
||||
#define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_high(pin))
|
||||
|
||||
// SD Card SDMMC
|
||||
#define MICROPY_HW_SDCARD_CK (pin_C12)
|
||||
#define MICROPY_HW_SDCARD_CMD (pin_D2)
|
||||
#define MICROPY_HW_SDCARD_D0 (pin_C8)
|
||||
#define MICROPY_HW_SDCARD_D1 (pin_C9)
|
||||
#define MICROPY_HW_SDCARD_D2 (pin_C10)
|
||||
#define MICROPY_HW_SDCARD_D3 (pin_C11)
|
||||
#define MICROPY_HW_SDCARD_DETECT_PIN (pin_G2)
|
||||
#define MICROPY_HW_SDCARD_DETECT_PULL (GPIO_PULLUP)
|
||||
#define MICROPY_HW_SDCARD_DETECT_PRESENT (GPIO_PIN_RESET)
|
||||
|
||||
// USB config
|
||||
#define MICROPY_HW_USB_FS (1)
|
||||
#define MICROPY_HW_USB_VBUS_DETECT_PIN (pin_A9)
|
||||
#define MICROPY_HW_USB_OTG_ID_PIN (pin_A10)
|
||||
20
ports/stm32/boards/STM32F469DISC/mpconfigboard.mk
Normal file
20
ports/stm32/boards/STM32F469DISC/mpconfigboard.mk
Normal file
@@ -0,0 +1,20 @@
|
||||
# MCU settings
|
||||
MCU_SERIES = f4
|
||||
CMSIS_MCU = STM32F469xx
|
||||
MICROPY_FLOAT_IMPL = double
|
||||
AF_FILE = boards/stm32f479_af.csv
|
||||
|
||||
ifeq ($(USE_MBOOT),1)
|
||||
# When using Mboot all the text goes together after the filesystem
|
||||
LD_FILES = boards/stm32f469xi.ld boards/common_blifs.ld
|
||||
TEXT0_ADDR = 0x08020000
|
||||
else
|
||||
# When not using Mboot the ISR text goes first, then the rest after the filesystem
|
||||
LD_FILES = boards/stm32f469xi.ld boards/common_ifs.ld
|
||||
TEXT0_ADDR = 0x08000000
|
||||
TEXT1_ADDR = 0x08020000
|
||||
endif
|
||||
|
||||
# MicroPython settings
|
||||
MICROPY_PY_SSL = 1
|
||||
MICROPY_SSL_MBEDTLS = 1
|
||||
135
ports/stm32/boards/STM32F469DISC/pins.csv
Normal file
135
ports/stm32/boards/STM32F469DISC/pins.csv
Normal file
@@ -0,0 +1,135 @@
|
||||
A0,PB1
|
||||
A1,PC2
|
||||
A2,PC3
|
||||
A3,PC4
|
||||
A4,PC5
|
||||
A5,PA4
|
||||
D0,PG9
|
||||
D1,PG14
|
||||
D2,PG13
|
||||
D3,PA1
|
||||
D4,PG12
|
||||
D5,PA2
|
||||
D6,PA6
|
||||
D7,PG11
|
||||
D8,PG10
|
||||
D9,PA7
|
||||
D10,PH6
|
||||
D11,PB15
|
||||
D12,PB14
|
||||
D13,PD3
|
||||
D14,PB9
|
||||
D15,PB8
|
||||
LED1,PG6
|
||||
LED2,PD4
|
||||
LED3,PD5
|
||||
LED4,PK3
|
||||
SW,PA0
|
||||
TP1,PH2
|
||||
TP2,PI8
|
||||
TP3,PH15
|
||||
AUDIO_INT,PD6
|
||||
AUDIO_SDA,PH8
|
||||
AUDIO_SCL,PH7
|
||||
EXT_SDA,PB9
|
||||
EXT_SCL,PB8
|
||||
EXT_RST,PG3
|
||||
SD_D0,PC8
|
||||
SD_D1,PC9
|
||||
SD_D2,PC10
|
||||
SD_D3,PC11
|
||||
SD_CK,PC12
|
||||
SD_CMD,PD2
|
||||
SD_SW,PC2
|
||||
LCD_BL_CTRL,PK3
|
||||
LCD_INT,PI13
|
||||
LCD_SDA,PH8
|
||||
LCD_SCL,PH7
|
||||
OTG_FS_POWER,PD5
|
||||
OTG_FS_OVER_CURRENT,PD4
|
||||
OTG_HS_OVER_CURRENT,PE3
|
||||
USB_VBUS,PA9
|
||||
USB_ID,PA10
|
||||
USB_DM,PA11
|
||||
USB_DP,PA12
|
||||
USB_HS_CLK,PA5
|
||||
USB_HS_STP,PC0
|
||||
USB_HS_NXT,PH4
|
||||
USB_HS_DIR,PI11
|
||||
USB_HS_D0,PA3
|
||||
USB_HS_D1,PB0
|
||||
USB_HS_D2,PB1
|
||||
USB_HS_D3,PB10
|
||||
USB_HS_D4,PB11
|
||||
USB_HS_D5,PB12
|
||||
USB_HS_D6,PB13
|
||||
USB_HS_D7,PB5
|
||||
UART1_TX,PB10
|
||||
UART1_RX,PB11
|
||||
UART6_TX,PG14
|
||||
UART6_RX,PG9
|
||||
CAN2_TX,PB13
|
||||
CAN2_RX,PB12
|
||||
QSPI_CS,PB6
|
||||
QSPI_CLK,PF10
|
||||
QSPI_D0,PF8
|
||||
QSPI_D1,PF9
|
||||
QSPI_D2,PF7
|
||||
QSPI_D3,PF6
|
||||
FMC_SDCKE0,PH2
|
||||
FMC_SDNE0,PH3
|
||||
FMC_SDCLK,PG8
|
||||
FMC_SDNCAS,PG15
|
||||
FMC_SDNRAS,PF11
|
||||
FMC_SDNWE,PH5
|
||||
FMC_BA0,PG4
|
||||
FMC_BA1,PG5
|
||||
FMC_NBL0,PE0
|
||||
FMC_NBL1,PE1
|
||||
FMC_NBL2,PI4
|
||||
FMC_NBL3,PI5
|
||||
FMC_A0,PF0
|
||||
FMC_A1,PF1
|
||||
FMC_A2,PF2
|
||||
FMC_A3,PF3
|
||||
FMC_A4,PF4
|
||||
FMC_A5,PF5
|
||||
FMC_A6,PF12
|
||||
FMC_A7,PF13
|
||||
FMC_A8,PF14
|
||||
FMC_A9,PF15
|
||||
FMC_A10,PG0
|
||||
FMC_A11,PG1
|
||||
FMC_A12,PG2
|
||||
FMC_D0,PD14
|
||||
FMC_D1,PD15
|
||||
FMC_D2,PD0
|
||||
FMC_D3,PD1
|
||||
FMC_D4,PE7
|
||||
FMC_D5,PE8
|
||||
FMC_D6,PE9
|
||||
FMC_D7,PE10
|
||||
FMC_D8,PE11
|
||||
FMC_D9,PE12
|
||||
FMC_D10,PE13
|
||||
FMC_D11,PE14
|
||||
FMC_D12,PE15
|
||||
FMC_D13,PD8
|
||||
FMC_D14,PD9
|
||||
FMC_D15,PD10
|
||||
FMC_D16,PH8
|
||||
FMC_D17,PH9
|
||||
FMC_D18,PH10
|
||||
FMC_D19,PH11
|
||||
FMC_D20,PH12
|
||||
FMC_D21,PH13
|
||||
FMC_D22,PH14
|
||||
FMC_D23,PH15
|
||||
FMC_D24,PI0
|
||||
FMC_D25,PI1
|
||||
FMC_D26,PI2
|
||||
FMC_D27,PI3
|
||||
FMC_D28,PI6
|
||||
FMC_D29,PI7
|
||||
FMC_D30,PI9
|
||||
FMC_D31,PI10
|
||||
|
41
ports/stm32/boards/STM32F469DISC/stm32f4xx_hal_conf.h
Normal file
41
ports/stm32/boards/STM32F469DISC/stm32f4xx_hal_conf.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/* This file is part of the MicroPython project, http://micropython.org/
|
||||
* The MIT License (MIT)
|
||||
* Copyright (c) 2025 Mike Tolkachev <contact@miketolkachev.dev>
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_STM32F4XX_HAL_CONF_H
|
||||
#define MICROPY_INCLUDED_STM32F4XX_HAL_CONF_H
|
||||
|
||||
// Oscillator values in Hz
|
||||
#define HSE_VALUE (8000000)
|
||||
#define LSE_VALUE (32768)
|
||||
#define EXTERNAL_CLOCK_VALUE (12288000)
|
||||
|
||||
// Oscillator timeouts in ms
|
||||
#define HSE_STARTUP_TIMEOUT (100)
|
||||
#define LSE_STARTUP_TIMEOUT (5000)
|
||||
|
||||
#define HAL_DMA2D_MODULE_ENABLED
|
||||
#define HAL_LTDC_MODULE_ENABLED
|
||||
#define HAL_QSPI_MODULE_ENABLED
|
||||
#define HAL_DSI_MODULE_ENABLED
|
||||
|
||||
#include "boards/stm32f4xx_hal_conf_base.h"
|
||||
|
||||
#ifdef HAL_DMA2D_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_dma2d.h"
|
||||
#endif /* HAL_DMA2D_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_LTDC_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_ltdc.h"
|
||||
#endif /* HAL_LTDC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_QSPI_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_qspi.h"
|
||||
#endif /* HAL_QSPI_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_DSI_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_dsi.h"
|
||||
#endif /* HAL_DSI_MODULE_ENABLED */
|
||||
|
||||
#endif // MICROPY_INCLUDED_STM32F4XX_HAL_CONF_H
|
||||
Reference in New Issue
Block a user