SPIFFS on STM32

martinayotte
Tue Jun 21, 2016 1:16 am
Hi Roger,

You probably remember our discussions about SPIFFS …

It seems that original author, Peter Andersson, did something under STM32, but not with internal Flash, but with SPI external Flash, this still interesting.
On my custom STM32 boards, I have a SPI Flash, so I will take a look at that, but again “time is the missing ingredient” …

https://github.com/pellepl/stm32_spiffs


mrburnette
Tue Jun 21, 2016 12:00 pm
Well, that’s very interesting. I’ll be watching this thread to see how this all flows. The ESP8266 implementation works remarkably well, so a STM32 with external flash should provide some nice additional file-system capabilities without the power implications associated with SD card.

Ray


martinayotte
Tue Jun 21, 2016 1:45 pm
mrburnette wrote:without the power implications associated with SD card.

rexnanet
Tue Jun 21, 2016 5:00 pm
I’ll be watching this too :)

I’m trying to get fast images onto the ILI9341 but SD cards will only go up to 20-25Mhz SPI speed (v2.0. Will go up to 104Mhz? on v3.01 but don’t know if STM32 would support this version…) while i.e. sst26vf064b will go up to 104Mhz.
The ideal scenario would be to get DMA running directly from one SPI to the other :)

But this might come in handy.
Only downside is the flash programming. SD card is more practical for copying files from the PC.


mrburnette
Tue Jun 21, 2016 6:15 pm
martinayotte wrote:
<…>
Which “power implications” you’ve faced with SDCard ?

martinayotte
Tue Jun 21, 2016 7:31 pm
I never faced such issue, but you’re right about capacitor, I’ve always placed a 4.7uF ceramic nearby.

RogerClark
Tue Jun 21, 2016 10:56 pm
Slightly off topic, but Francesco at Arduino.cc told me that he is working on SDIO for the OTTO, so we should be able to port his work to either the new HAL MX core or possibly even to the F103 using my hacky HAL library.

But this only helps for the larger F103 MCUs that have SDIO


mrburnette
Wed Jun 22, 2016 12:36 pm
hacky HAL

Ummmm…

hacky + HAL = hHAL

A new acronym is born. :lol:


rexnanet
Wed Jun 22, 2016 12:50 pm
martinayotte wrote:I never faced such issue, but you’re right about capacitor, I’ve always placed a 4.7uF ceramic nearby.

michael_l
Thu Dec 15, 2016 10:29 am
I’m working with SPIFFS to get it working under BluePill with STM32Duino with SPI Flash. I’m using 32Mbit WinBond SPI Flash and it seems I have some preliminary code working. I can mount filesystem and read/write files..

It has POSIX api- style functions but of course not every function is implemented. There’s no support for directories and every file is considered to live in “root” folder. It has read and write caches implemented with some sort of wear-leveling.

In summary all you need to implement for SPIFFS to work is functions for: erase, read and write.

It would be interesting to get this working under BP or Maple Mini using _internal flash_. It would be nice to have small filesystem. depending on your code size it should be possible to say allocate 96kB or even more for file system. I was thinking to start from library under STm32F1 / libraries / EEPROM library as it has ready functions to read/write/erase flash on STM32. I guess it should be possible to implement erase/write and read operations.


Pito
Thu Dec 15, 2016 1:56 pm
FYI – the 103ZET board has got: 524kB internal flash, 40Mbit external SPI flash, and the pads for soldering in a NAND flash and an SRAM.
So, well equipped for SPIFFS :)
We may test then..
It would be interesting to get this working under BP or Maple Mini using _internal flash_.
The internal flash has usually much lower write endurance as the external ones.. Maybe 1:100..
PS:
The 103ZET internal flash is rated 10.000 over the entire temp range
The external SPI ie. W25X40 is rated 1.000.000

Manny
Thu Dec 15, 2016 4:28 pm
Been using this library for my project https://github.com/Marzogh/SPIFlash was very easy to port, a liberal sprinkling of | defined(__STM32F1__)

michael_l
Fri Dec 16, 2016 10:28 am
Manny wrote:Been using this library for my project https://github.com/Marzogh/SPIFlash was very easy to port, a liberal sprinkling of | defined(__STM32F1__)

Leave a Reply

Your email address will not be published. Required fields are marked *