RP.Flash

Entities

Simple Types

Constants

Subprograms

Description

Erase

procedure Erase
   (Offset : Flash_Offset;
    Length : Natural)

Erase Length bytes of flash starting at Offset bytes from the beginning of flash. Length and Offset must be multiples of 4096.

Parameters
Offset
Length

Flash_Offset

type Flash_Offset is range 0 .. Flash_Size;

Flash_Size

Flash_Size  : constant := 16 * 1024 * 1024;

XIP maps up to 16 MB of flash. Actual flash chip may be smaller.

In_Flash

function In_Flash
   (Addr : System.Address)
   return Boolean
Parameters
Addr
Return Value

Page_Size

Page_Size   : constant := 256;

Program

procedure Program
   (Offset : Flash_Offset;
    Source : System.Address;
    Length : Natural)

Program Length bytes of flash starting at Offset bytes from the beginning of flash using the Source buffer. Length must be a multiple of 256.

Parameters
Offset
Source
Length

Sector_Size

Sector_Size : constant := 4096;

To_Address

function To_Address
   (Offset : Flash_Offset)
   return System.Address
Parameters
Offset
Return Value

To_Flash_Offset

function To_Flash_Offset
   (Addr : System.Address)
   return Flash_Offset
Parameters
Addr
Return Value

Unique_Id

function Unique_Id
   return UInt64

Read the Unique Id (4Bh) from the flash chip

Return Value