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

Thread: Teensy 4.1 accessing the 8 MB built-in Flash

  1. #1
    Junior Member
    Join Date
    Feb 2020
    Posts
    2

    Teensy 4.1 accessing the 8 MB built-in Flash

    I would like to utilize some of the built-in Flash memory on a T4.1. My application
    uses about 200 kB, so most of the 8 MB is currently unused.

    A pointer to either a forum thread that discusses using this memory, or maybe an
    example of reading and writing to it would be helpful.

    When Teensy Loader uploads a new version of the firmware, does it erase the
    whole 8 MB, or just enough pages (what size are the pages) for the new firmware?

    I'm hoping to be able to have some storage that is persistent across firmware
    updates.

    Thanks for any guidance.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,085
    Install the latest beta
    https://forum.pjrc.com/threads/67252...no-1-54-Beta-9

    Use the LittleFS library

    Create an instance of LittleFS_Program for a filesystem which accesses program memory.


    I'm hoping to be able to have some storage that is persistent across firmware updates.
    Unfortunately, you won't get this until we do a bootloader update, which won't come until near the end of 2021 or perhaps sometime in 2022.

    To persist across code uploads, use EEPROM (limited size) or add a flash chip.

  3. #3
    Junior Member
    Join Date
    Feb 2020
    Posts
    2
    Thanks Paul for the pointer.

    -- Philip

Posting Permissions

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