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

Thread: Flash writes take time to stabilize

  1. #1
    Junior Member
    Join Date
    Sep 2018
    Posts
    15

    Flash writes take time to stabilize

    Not a teensy bug per-se, but a good thing to be aware of with respect to the MK20DX256 controller.

    Flash writes using the program_longword command to the first 16 or so bytes to a sector take a few seconds to stabilize. The data is 0xFF until an indeterminate time.

    The CCIF command complete register cannot be trusted for these bytes.

    I have no idea why this is, but it seems to be a bug in the FFTL controller.

    My test was done at 0x2000 after a sector_erase command.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    18,969
    You need to invalidate the cache, otherwise you're still reading the old data from the flash controller's cache.

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    18,969
    When using Teensy 3.6, there's also a larger 8K cache to keep in mind, and of course the same small cache memory inside the flash controller.

Posting Permissions

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