Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: utilising flash for presets

  1. #1

    utilising flash for presets

    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 :-)

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    15,088
    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.

  3. #3
    Quote Originally Posted by defragster View Post
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •