Skip to content
Snippets Groups Projects
Select Git revision
  • 6d983539bcff2a540dd136a7e84e1db2b334528f
  • wip-bootstrap default
  • dualcore
  • ch3/leds
  • ch3/time
  • master
6 results

flash.h

Blame
  • user avatar
    Damien George authored
    Internal flash used for the filesystem is now written (from the cache)
    only after a 5s delay, or when a file is closed, or when the drive is
    unmounted from the host.  This delay means that multiple writes can
    accumulate in the cache, and leads to less writes to the flash, making
    it last longer.
    
    It's implemented by a high-priority interrupt that takes care of flash
    erase and write, and flushing the cache.
    
    This is still only an interim solution for the flash filesystem.  It
    eventually needs to be replaced with something that uses less RAM for
    the cache, something that can use more of the flash, and something that
    does proper wear levelling.
    6d983539
    History
    flash.h 247 B
    uint32_t flash_get_sector_info(uint32_t addr, uint32_t *start_addr, uint32_t *size);
    void flash_erase(uint32_t flash_dest, const uint32_t *src, uint32_t num_word32);
    void flash_write(uint32_t flash_dest, const uint32_t *src, uint32_t num_word32);