Open r00t1900 opened 2 years ago
This support query should be raised in the forum rather than in this bug tracker.
Re using a set of SPI flash chips to create a filesystem see this repo.
I found some interesting posts on the forum and some marco I found useful is PICO_FLASH_SIZE_BYTES
and MICROPY_HW_FLASH_STORAGE_BYTES
. Is that correct? I would like to try it and find out myself. you are so brilliant! I've also found your replies on the micropython forum! Posts are:
Rpeo micropython_eeprom is very good! that's what I am pointing for. What's the different bewtween rp2.Flash
and this spi_flash.Flash
? Is the former can only operate internal flash mounted on QSPI and the latter can operate most of the external flash wired on SPI bus?
description
Currently I bought an official raspberry pi pico board and a third-party pico board. One of the difference between them is the size of flash: the third-party board use an 4MB Flash instead of 2MB Flash in pi pico.
However, after I download the precompiled
.u2f
firmware file for pi pico and flash it to both of them, I got the same available space of filesystem:Both of them output is about
1.38MB
in total(calculated byblocks*bsize
), as the firmware has already took about500-600KB
size for storage so the total flash size should be 2MB.some thoughts
I guess that may be something define in the
make
steps. I lookup inport/rp2
and found a marco inrp2_flash.c
:And
1408KB
is exactly almost equal to1.37MB
. Is this the main reason why either W25Q16 or W25Q32 perform the same available filesystem size? I've also notice that the include part ofrp2_flash.c
:But I can not find the corresponding file
hardware/flash.h
.questions
how to reconfigure for other flash size What should I do if I would like to build an alternative micropython firmware for a pico-like board? Maybe different in flash,crystal and pin layout. Where should I reconfigure before building?(mainly is the flash size)
how to operate more flash components The official pi pico is designed with flash connected to XIP via a single QSPI interface. But what should I do if I want to operate one more flash via the normal/common spi interface?(the speed is not a problem). I would like to storage data into different flash components, like 8 flash chips and switch them by CS signal. Can they be use as an another standalone filesystem with littlefs? If no, is there any spi-flash api for micropython to
read/write/erase
external flash component? If no, then I have to implement all basic spi-flash functions.Thanks for reading and looking forward to your replies :)