Pico vs Pico W memory

RP2040 based microcontroller boards running MicroPython.
Target audience: MicroPython users with an RP2040 boards.
This does not include conventional Linux-based Raspberry Pi boards.
Post Reply
tonyd
Posts: 2
Joined: Sun Aug 21, 2022 10:47 am

Pico vs Pico W memory

Post by tonyd » Sun Aug 21, 2022 10:56 am

Hi all

I was trying to program a Pico W to go to a API and pick up some data to display on a Waveshare e-ink (5.83B with Pico hat). I kept running out of memory. I tried running the Waveshare test code and that also ran out of memory. On a whim, I decided to try a standard Pico and that ran the test code and my own code OK

I compared memory with freshly rebooted boards and got this

Pico
stack: 524 out of 7936
GC: total: 192064, used: 14864, free: 177200
No. of 1-blocks: 266, 2-blocks: 52, max blk sz: 64, max free sz: 11060
Pico W
stack: 556 out of 7936
GC: total: 166016, used: 11280, free: 154736
No. of 1-blocks: 211, 2-blocks: 36, max blk sz: 64, max free sz: 9658
I assume the difference is the Pico W loading up the wireless drivers. I could not find any info to confirm, does anybody know?

Thanks

Tony

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Pico vs Pico W memory

Post by jimmo » Mon Aug 22, 2022 1:35 am

tonyd wrote:
Sun Aug 21, 2022 10:56 am
I assume the difference is the Pico W loading up the wireless drivers. I could not find any info to confirm, does anybody know?
Not the drivers exactly, but we reserve some space for the network stack to allocate socket and ssl buffers.

We are in the process of moving the ssl buffers over to the MicroPython heap, so this will reclaim a lot of heap memory (~20kiB) for when you're not using SSL.

tonyd
Posts: 2
Joined: Sun Aug 21, 2022 10:47 am

Re: Pico vs Pico W memory

Post by tonyd » Mon Aug 22, 2022 12:37 pm

Jimmo
Thanks for the reply


Tony

Post Reply