Rpi Pico w/ 16MB, MicroPython - Page 1
Forum section: electronics / general

author: MikeK
author_rank: Super Contributor
timestamp: November 19, 2022, 11:19:33 pm
content: I got one of these RP2040 "Pico"-like units on AliX*, but with a 16MB flash chip instead of the Pico's 2MB. But if I install MicroPython and check the filesystem under Thonny using this:Code:import osos.statvfs('/')...I get the same results with the 16MB board as the official 2MB Pico. Do I have to do something to get it to recognize the larger Flash size? Was I punked and it's actually a 2MB?...It has the 16MByte chip code on it: Winbond 25Q128JVSQ.EDIT: Okay, it just hit me that the Flash size may be built into the MicroPython uf2 file. Yes? In which case I'll have to do a compile or file one for the 16MB.* Nice unit. In addition to the flash it has a reset button, another button for the user, and what looks like a Neopixel. And pin labels on the top side!

author: MikeK
author_rank: Super Contributor
timestamp: November 19, 2022, 11:43:45 pm
content: Found out...yes, there are separate MicroPython firmware files for each board.

author: MikeK
author_rank: Super Contributor
timestamp: November 21, 2022, 01:25:04 am
content: I created a MicroPython firmware version for the 16MB "pico" board from AliX. See attached.

author: MikeK
author_rank: Super Contributor
timestamp: November 21, 2022, 10:55:11 am
content: That firmware behaves correctly,but does not include the demo main.py file that the official firmware does. I haven't figured out why. I've recompiled the regular Pico firmware and it includes main.py. But compiling my 16MB version, it does not include main.py. Even though my 16MB version is a clone of the regular version with just changes to the flash size. If I figure this out I'll post a new version.This one is still perfectly usable, of course.EDIT: I wrong about that. There is no main.py that gets included with the firmware. What I posted is the proper firmware for the 16MB board from AliX.

author: ReapeR
author_rank: Newbie
timestamp: May 01, 2023, 06:05:26 pm
content: There is new version of MicroPython (1.20.0). Can you build the 16MB firmware for it or post a link with the instructions to DIY?

author: MikeK
author_rank: Super Contributor
timestamp: May 02, 2023, 07:17:10 pm
content: I'll take a look. I forget where all my code and things are for this.

author: ReapeR
author_rank: Newbie
timestamp: May 02, 2023, 08:05:42 pm
content: Thanks.Are there a lot of modifications to the original MicroPython release? Is DIY very difficult?

author: ReapeR
author_rank: Newbie
timestamp: May 03, 2023, 04:04:33 pm
content: After adding an Issue to the GitHub page of MicroPython they gave me that link:https://micropython.org/download/WEACTSTUDIO/It is based on 1.20.0 and allocates 15MB.

author: tonyr
author_rank: Newbie
timestamp: July 31, 2023, 07:54:11 am
content: I've just taken delivery of three of the AliExpress Pico clones. The firmware.zip file that MikeK supplied above works for me, and is the only thing I've found that does for the Raspberry Pi Pico and Thonny environment. I'm used to compiling micropython for other projects, I'd quite like to be able to do this and so upgrade to 1.20. If anyone can reproduce firmware.zip or knows the magic 'make BOARD=XXX' incantation then please do let us know.BTW the search term 'VCC-GND Studios YD-RP2040' seems to be what is needed.

author: MikeK
author_rank: Super Contributor
timestamp: August 05, 2023, 02:47:41 pm
content: I couldn't find my files, and I don't use MicroPython anymore, but I created the firmware for the AliX 16MB board. Let me know if it doesn't work. It uses the latest pico-sdk and micropython files from GIT as of a few minutes ago.

author: MikeK
author_rank: Super Contributor
timestamp: August 07, 2023, 02:45:45 am
content: Here's a zip with MicroPython firmware for Pico, Pico W, generic 16MB, and generic 4MB boards.

author: MikeK
author_rank: Super Contributor
timestamp: August 22, 2023, 10:04:05 pm
content: FYI: The I2C module in the latest version (including the one I posted above) uses different default pins. The old default pins were GP8,9 and the new ones are GP4,5. I don't use micropython much, but I had to test something quick and this change had me pulling my hair out. I don't know what else has changed, but thought I'd point this out.EDIT: Nevermind this post.

author: Upali
author_rank: Newbie
timestamp: October 31, 2023, 01:21:19 am
content: Quote from: MikeK on August 07, 2023, 02:45:45 amHi MikeKI have both 4MB and 16MB versions of RP2040 (at least according to the Flash Chips W25Q32JV and W25Q128JV resp,).I used your firmware on each version. Both worked OK. Thanks.To find out the real flash size I ran the Micropython code fromhttps://forums.raspberrypi.com/viewtopic.php?t=345314which useshttps://docs.micropython.org/en/latest/library/os.html#os.statvfsCode:import osstat = os.statvfs("/")size = stat * statfree = stat * statused = size - freeKB = 1024MB = 1024 * 1024print("Size : {:,} bytes, {:,} KB, {} MB".format(size, size / KB, size / MB))print("Used : {:,} bytes, {:,} KB, {} MB".format(used, used / KB, used / MB))print("Free : {:,} bytes, {:,} KB, {} MB".format(free, free / KB, free / MB))if size > 8 * MB : board, flash = "Unknown", 16 * MBelif size > 4 * MB : board, flash = "Unknown", 8 * MBelif size > 2 * MB : board, flash = "Unknown", 4 * MBelif size > 1 * MB : board, flash = "Pico", 2 * MBelse : board, flash = "Pico W", 2 * MBprint("{} board with {} MB Flash".format(board, flash // MB))Now if I use the firmware "generic_rp2040_neo_16mb_firmware.uf2" in the RP2040 with 4MB, the result of the above on the Thonny console is:Code:MPY: soft rebootSize : 15,728,640 bytes, 15360 KB, 15.0 MBUsed : 8,192 bytes, 8 KB, 0.0078125 MBFree : 15,720,448 bytes, 15352 KB, 14.99219 MBUnknown board with 16 MB FlashI am new to Micropython and cannot understand why it shows the size as: 15,728,640 byte and therefore "Unknown board with 16MB Flash" although it is only 4MB.It seems that it shows the amount shown in Firmware and not really the size of the Flash memory.Could you please analyze and let me know why. Is the test program wrong?Can you suggest a MicroPython code to verify the size flash memory?Thank you.