Skip to content

Commit

Permalink
stm32/WEACTV20_F411: Add variant for FLASH_4MB.
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Leech <[email protected]>
  • Loading branch information
pi-anl committed Aug 13, 2024
1 parent a4470e9 commit 776a0ff
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
18 changes: 18 additions & 0 deletions ports/stm32/boards/WEACTV20_F411/board.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"deploy": [
"../PYBV10/deploy.md"
],
"docs": "",
"features": [],
"images": [
"WEACTV20_F411.jpg"
],
"mcu": "stm32f411",
"product": "WeAct v2.0 'blackpill'",
"thumbnail": "",
"url": "https://stm32-base.org/boards/STM32F411CEU6-WeAct-Black-Pill-V2.0.html",
"variants": {
"FLASH_4MB": "SPI Flash 4MB"
},
"vendor": "WeAct Studio"
}
4 changes: 4 additions & 0 deletions ports/stm32/boards/WEACTV20_F411/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

// Set to 1 to use internal flash, set to 0 to use external SPI flash
// You also need to set the size of the flash later in this header
#ifndef MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE
#define MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE (1)
#endif

// some users having issues with FLASH_LATENCY_2, so set to 3
// from https://forum.micropython.org/viewtopic.php?t=7154
Expand Down Expand Up @@ -93,7 +95,9 @@
// 4MB => 32MBit
// 8MB => 64MBit
// 16MB => 128MBit
#ifndef MICROPY_HW_SPIFLASH_SIZE_BITS
#define MICROPY_HW_SPIFLASH_SIZE_BITS (128 * 1024 * 1024)
#endif

#if !MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DMICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE=0 -DMICROPY_HW_SPIFLASH_SIZE_BITS="(32 * 1024 * 1024)"

0 comments on commit 776a0ff

Please sign in to comment.