tadtruex / PiPico

Bare metal pi-pico stuff
0 stars 0 forks source link

Durable storage #14

Closed tadtruex closed 1 year ago

tadtruex commented 1 year ago

It's probably going to be important to have the data in permanent storage on the flash chip. Students will surely mess things up...

tadtruex commented 1 year ago

A little googling...

Should look at

littfs and pico-littlefs

LittleFS looks very well thought out and documented. pico-littlefs maybe less so, but could be a decent starting point.

tadtruex commented 1 year ago

Better yet... Let's not complicate things too much. This doesn't have to be a general solution. Just save room at the end of flash for 4 * NUM_SAMPLES bytes. Or (maybe) N times that. Read it into SAMPLE_BUFFER at the start. That way, if any student turns things off before grabbing their data, it will still be there next time.