Skip to content

Commit b3e145b

Browse files
committed
stm32/PYBD_SF2: Specify spiflash chip used on board.
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
1 parent f664586 commit b3e145b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ports/stm32/boards/PYBD_SF2/mpconfigboard.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ void board_sleep(int value);
6565
#define MICROPY_HW_RTC_USE_CALOUT (1)
6666

6767
// SPI flash #1, for R/W storage
68+
#define MICROPY_HW_SPIFLASH_DEVICES AT25SF161B
6869
#define MICROPY_HW_SOFTQSPI_SCK_LOW(self) (GPIOE->BSRR = (0x10000 << 11))
6970
#define MICROPY_HW_SOFTQSPI_SCK_HIGH(self) (GPIOE->BSRR = (1 << 11))
7071
#define MICROPY_HW_SOFTQSPI_NIBBLE_READ(self) ((GPIOE->IDR >> 7) & 0xf)
71-
#define MICROPY_HW_SPIFLASH_SIZE_BITS (16 * 1024 * 1024)
7272
#define MICROPY_HW_SPIFLASH_CS (pyb_pin_QSPI1_CS)
7373
#define MICROPY_HW_SPIFLASH_SCK (pyb_pin_QSPI1_CLK)
7474
#define MICROPY_HW_SPIFLASH_IO0 (pyb_pin_QSPI1_D0)
@@ -84,7 +84,6 @@ extern struct _spi_bdev_t spi_bdev;
8484
#endif
8585
#define MICROPY_HW_BDEV_SPIFLASH (&spi_bdev)
8686
#define MICROPY_HW_BDEV_SPIFLASH_CONFIG (&spiflash_config)
87-
#define MICROPY_HW_BDEV_SPIFLASH_SIZE_BYTES (MICROPY_HW_SPIFLASH_SIZE_BITS / 8)
8887
#define MICROPY_HW_BDEV_SPIFLASH_EXTENDED (&spi_bdev) // for extended block protocol
8988

9089
// SPI flash #2, to be memory mapped

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy