summary: how do I enable the 2mb spi?
I suspect the follow up question: will someone port CPs implementation?
I have https://learn.adafruit.com/adafruit-stm ... er-express
which says:
2 MB SPI Flash chip
if I understand my history, 2mb was added after this:
https://github.com/micropython/micropyt ... board.h#L5
#define MICROPY_HW_HAS_FLASH (1)
which I guess is relevant to why I only have 95K fs, but CP has ~2m.
I went splunking around, all I have to offer is:
https://github.com/adafruit/circuitpyth ... oard.h#L32
#define FLASH_SIZE (0x100000)
[ADAFRUIT_F405_EXPRESS] enable (more) flash
Re: [ADAFRUIT_F405_EXPRESS] enable (more) flash
Have a look at the STM32L476DISC board config https://github.com/micropython/micropyt ... figboard.h
In summary:
- Disable MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE
- Define MICROPY_HW_SPIFLASH_{SIZE_BITS,CS,SCK,MISO,MOSI} (looks like the pins are defined later in the file f405_express file)
- Add the block device config for SPI flash (pretty much just copy that whole block)
- Add bdev.c and board_init.c
Re: [ADAFRUIT_F405_EXPRESS] enable (more) flash
...and then it'd be great if you could submit a PR to add support for this board to MicroPython!
Re: [ADAFRUIT_F405_EXPRESS] enable (more) flash
Here's how I did it on my F407ZG board:
https://github.com/mcauser/BLACK_F407ZG ... 10d08ca81e
https://github.com/mcauser/BLACK_F407ZG ... 10d08ca81e