SD card vs flash drive, speed?

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
bradstew
Posts: 3
Joined: Thu Nov 29, 2018 9:29 pm

Re: SD card vs flash drive, speed?

Post by bradstew » Wed Jan 09, 2019 2:50 pm

OK. Using a 128K for a r/w buffer still allows an additional 380+K. Or make it 256K buffer which still allows for an 256K of additional storage. Still better than what's in there now.

I'm an embedded engineer (for 40 years) and it particularly troubles me that so much flash memory is not utilized. It's always treated as a precious resource. If anything, it could be used as a virtual flash file system if not used for the uPython OS.

Moving forward, embedded MCU's are only going to have increased memory and performance. The new PyBoard in beta has an M7 core with a large memory footprint, eventually moving to 1M SRAM in place of relatively slow Flash. It would be a shame if fast SRAM were not fully utilized.

User avatar
dhylands
Posts: 2956
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: SD card vs flash drive, speed?

Post by dhylands » Wed Jan 09, 2019 5:46 pm

bradstew wrote:
Wed Jan 09, 2019 2:50 pm
OK. Using a 128K for a r/w buffer still allows an additional 380+K. Or make it 256K buffer which still allows for an 256K of additional storage. Still better than what's in there now.
The STM32F405 (which the pyboard is based on) has 64K of RAM in the CCM and 128K of regular RAM. Currently, the 64K CCM RAM is used for the flash buffer and the 128K is used for stack and heap.

It's probably possible to reduce the heap/stack down to 64K in order to support 128K flash buffer, but there currently isn't any code to do that.
bradstew wrote:
Wed Jan 09, 2019 2:50 pm
I'm an embedded engineer (for 40 years) and it particularly troubles me that so much flash memory is not utilized. It's always treated as a precious resource. If anything, it could be used as a virtual flash file system if not used for the uPython OS.
Contributions for improvements are welcome.
bradstew wrote:
Wed Jan 09, 2019 2:50 pm
Moving forward, embedded MCU's are only going to have increased memory and performance. The new PyBoard in beta has an M7 core with a large memory footprint, eventually moving to 1M SRAM in place of relatively slow Flash. It would be a shame if fast SRAM were not fully utilized.
There are always tradeoffs to be made, and what makes one person happy, makes somebody else unhappy.

Some of the other processors like the STM32L4 series have much smaller flash blocks so more of the flash can be used for filesystem.

I believe that the new M7 based board will have external SPI based flash which will allow for much larger code and filesystems.

Post Reply