mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 09:50:15 +01:00
This change adds WeAct Studio Mini STM32H743 board support to the STM32 port. Some of the work from PR #12540 is combined here. WeAct Studio Mini STM32H43 board: https://github.com/WeActStudio/MiniSTM32H7xx This board uses STM32H743VI: https://www.st.com/en/microcontrollers-microprocessors/stm32h743vi.html Signed-off-by: Yuuki NAGAO <wf.yn386@gmail.com>
48 lines
1.1 KiB
C
48 lines
1.1 KiB
C
/* This file is part of the MicroPython project, http://micropython.org/
|
|
* The MIT License (MIT)
|
|
* Copyright (c) 2019 Damien P. George
|
|
*/
|
|
|
|
#include "storage.h"
|
|
#include "spi.h"
|
|
#include "qspi.h"
|
|
#include "py/mpconfig.h"
|
|
|
|
static const spi_proto_cfg_t spi_bus = {
|
|
.spi = &spi_obj[0], // SPI1
|
|
.baudrate = 25000000,
|
|
.polarity = 0,
|
|
.phase = 0,
|
|
.bits = 8,
|
|
.firstbit = SPI_FIRSTBIT_MSB,
|
|
};
|
|
|
|
#if MICROPY_HW_SPIFLASH_ENABLE_CACHE
|
|
static mp_spiflash_cache_t spi_bdev_cache;
|
|
#endif
|
|
|
|
const mp_spiflash_config_t spiflash_config = {
|
|
.bus_kind = MP_SPIFLASH_BUS_SPI,
|
|
.bus.u_spi.cs = MICROPY_HW_SPIFLASH_CS,
|
|
|
|
.bus.u_spi.data = (void *)&spi_bus,
|
|
.bus.u_spi.proto = &spi_proto,
|
|
#if MICROPY_HW_SPIFLASH_ENABLE_CACHE
|
|
.cache = &spi_bdev_cache,
|
|
#endif
|
|
};
|
|
|
|
spi_bdev_t spi_bdev;
|
|
|
|
// Second external SPI flash uses hardware QSPI interface
|
|
const mp_spiflash_config_t spiflash2_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_bdev_t spi_bdev2;
|