Module flashcalw

Source
Expand description

Implementation of the SAM4L flash controller.

This implementation of the flash controller for the SAM4L uses interrupts to handle main tasks of a flash – write, reads, and erases. If modifying this file, you should check whether the flash commands (issued via issue_command) generates an interrupt and design a higher level function based off of that.

Although the datasheet says that when the FRDY interrupt is on, an interrupt will be generated after a command is complete, it doesn’t appear to occur for some commands.

A clean interface for reading from flash, writing pages and erasing pages is defined below and should be used to handle the complexity of these tasks.

A Client should be set to enable a callback after a command is completed.

Almost all of the flash controller functionality is implemented (except for general purpose fuse bits, and more granular control of the cache).

Structs§

FLASHCALW
Sam4lPage
This is a wrapper around a u8 array that is sized to a single page for the SAM4L. Users of this module must pass an object of this type to use the hil::flash::Flash interface.