utilising flash for presets

Status
Not open for further replies.

grahamguitarman

Well-known member
Hi
I'm developing a synthesiser which allows the creation of custom waveforms.
I'm reaching the point where I'd like to allow the user to store presets onboard, preferably using the internal flash memory.
My software only uses 11% of flash memory so there is plenty of rom to spare.
Can someone give me some simple examples of how to read / write preset data to flash, and how to avoid straying into the program space (presumably by setting the address high enough?)
speed is not an issue as these are only user presets not data that needs to be read in real time.
I'd use eeprom but 4096 bytes is simply not enough space, I need approx 256 bytes per preset.
Thanks in advance :)
 
A Teensy 4.1 in use ... based on EEPROM size note ???

Note: the current bootloader erases ALL Program Flash on every upload. This would work after final code is placed, but be lost on any upload.

TeensyDuino 1.54 or later LittleFS could be used or give an idea of the Flash read/write process as it works.
 
A Teensy 4.1 in use ... based on EEPROM size note ???

Note: the current bootloader erases ALL Program Flash on every upload. This would work after final code is placed, but be lost on any upload.

TeensyDuino 1.54 or later LittleFS could be used or give an idea of the Flash read/write process as it works.

Apologies, I should have specified it as the Teensy 3.6, the hardware uses two teensies, a 3.6 for all display /rotary encoders, and preset saving etc, and a 4.0 with audio board does the actual sound generation. The bottlenecks caused by the tft display etc can interfere with the smoothness of audio generation!
I just need to save blocks of 256 bytes per preset, and be able to overwrite them. at the moment I can save the data to an array, or eeprom, I just have no experience of saving to other storage options.
 
Status
Not open for further replies.
Back
Top