Skip to content

Commit e1155b0

Browse files
committed
stm32/boards: Add definition for STM32H747I-DISCO.
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
1 parent 8feb714 commit e1155b0

File tree

8 files changed

+784
-0
lines changed

8 files changed

+784
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
* This file is part of the MicroPython project, http://micropython.org/
3+
*
4+
* The MIT License (MIT)
5+
*
6+
* Copyright (c) 2024 Andrew Leech
7+
*
8+
* Permission is hereby granted, free of charge, to any person obtaining a copy
9+
* of this software and associated documentation files (the "Software"), to deal
10+
* in the Software without restriction, including without limitation the rights
11+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
* copies of the Software, and to permit persons to whom the Software is
13+
* furnished to do so, subject to the following conditions:
14+
*
15+
* The above copyright notice and this permission notice shall be included in
16+
* all copies or substantial portions of the Software.
17+
*
18+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24+
* THE SOFTWARE.
25+
*/
26+
27+
#include "storage.h"
28+
#include "qspi.h"
29+
30+
#if MICROPY_HW_SPIFLASH_ENABLE_CACHE
31+
// Shared cache for first and second SPI block devices
32+
static mp_spiflash_cache_t spi_bdev_cache;
33+
#endif
34+
35+
// First external SPI flash uses hardware QSPI interface
36+
const mp_spiflash_config_t spiflash_config = {
37+
.bus_kind = MP_SPIFLASH_BUS_QSPI,
38+
.bus.u_qspi.data = NULL,
39+
.bus.u_qspi.proto = &qspi_proto,
40+
#if MICROPY_HW_SPIFLASH_ENABLE_CACHE
41+
.cache = &spi_bdev_cache,
42+
#endif
43+
};
44+
45+
spi_bdev_t spi_bdev;
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"deploy": [
3+
"../deploy.md"
4+
],
5+
"docs": "",
6+
"features": [
7+
"Dual-core",
8+
"Ethernet",
9+
"External Flash",
10+
"External RAM",
11+
"USB"
12+
],
13+
"images": [
14+
".jpg"
15+
],
16+
"mcu": "stm32h747",
17+
"product": "STM Discovery kit with STM32H747XI MCU",
18+
"thumbnail": "",
19+
"url": "https://www.st.com/en/evaluation-tools/stm32h747i-disco.html",
20+
"vendor": "STMicroelectronics"
21+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include("$(PORT_DIR)/boards/manifest.py")
2+
require("bundle-networking")

0 commit comments

Comments
 (0)