RZT Flexible Software Package Documentation  Release v2.2.0

 
HyperBus Interface

Detailed Description

Interface for accessing memory device via HyperBus.

Summary

The HyperBus API provides an interface that configures, writes, and erases sectors in HyperBus memory devices.

Data Structures

struct  hyperbus_status_t
 
struct  hyperbus_cfg_t
 
struct  hyperbus_api_t
 
struct  hyperbus_instance_t
 

Typedefs

typedef void hyperbus_ctrl_t
 

Enumerations

enum  hyperbus_burst_type_t
 
enum  hyperbus_space_select_t
 
enum  hyperbus_latency_count_t
 

Data Structure Documentation

◆ hyperbus_status_t

struct hyperbus_status_t

Status

Data Fields
bool device_busy

Whether or not a write or erase is in progress.

◆ hyperbus_cfg_t

struct hyperbus_cfg_t

User configuration structure used by the open function

Data Fields
hyperbus_burst_type_t burst_type Burst type in HyperBus protocol.
hyperbus_space_select_t access_space Access space in HyperBus protocol.
hyperbus_latency_count_t read_latency_count Latency count in reading.
hyperbus_latency_count_t memory_write_latency_count Latency count in memory writing.
hyperbus_latency_count_t register_write_latency_count Latency count in register writing.
uint32_t sector_erase_size Size of erase for sector erase.
void const * p_extend Pointer to implementation specific extended configurations.

◆ hyperbus_api_t

struct hyperbus_api_t

HyperBus implementations follow this API.

Data Fields

fsp_err_t(* open )(hyperbus_ctrl_t *p_ctrl, hyperbus_cfg_t const *const p_cfg)
 
fsp_err_t(* burstTypeSet )(hyperbus_ctrl_t *p_ctrl, hyperbus_burst_type_t burst_type)
 
fsp_err_t(* accessSpaceSet )(hyperbus_ctrl_t *p_ctrl, hyperbus_space_select_t access_space)
 
fsp_err_t(* write )(hyperbus_ctrl_t *p_ctrl, uint8_t const *const p_src, uint8_t *const p_dest, uint32_t byte_count)
 
fsp_err_t(* erase )(hyperbus_ctrl_t *p_ctrl, uint8_t *const p_device_address, uint32_t byte_count)
 
fsp_err_t(* statusGet )(hyperbus_ctrl_t *ctrl_t, hyperbus_status_t *const p_status)
 
fsp_err_t(* autoCalibrate )(hyperbus_ctrl_t *p_ctrl)
 
fsp_err_t(* close )(hyperbus_ctrl_t *ctrl_t)
 

Field Documentation

◆ open

fsp_err_t(* hyperbus_api_t::open) (hyperbus_ctrl_t *p_ctrl, hyperbus_cfg_t const *const p_cfg)

Open the HyperBus driver module.

Parameters
[in]p_ctrlPointer to a driver handle
[in]p_cfgPointer to a configuration structure

◆ burstTypeSet

fsp_err_t(* hyperbus_api_t::burstTypeSet) (hyperbus_ctrl_t *p_ctrl, hyperbus_burst_type_t burst_type)

Set Burst type.

Parameters
[in]p_ctrlPointer to a driver handle
[in]burst_typeBurst type

◆ accessSpaceSet

fsp_err_t(* hyperbus_api_t::accessSpaceSet) (hyperbus_ctrl_t *p_ctrl, hyperbus_space_select_t access_space)

Set Access space.

Parameters
[in]p_ctrlPointer to a driver handle
[in]access_spaceAccess space

◆ write

fsp_err_t(* hyperbus_api_t::write) (hyperbus_ctrl_t *p_ctrl, uint8_t const *const p_src, uint8_t *const p_dest, uint32_t byte_count)

Program any number of bytes of data within a boundary into the flash.

Parameters
[in]p_ctrlPointer to a driver handle
[in]p_srcThe memory address of the data to write to the flash device
[in]p_destThe location in the flash device address space to write the data to. Refer to the accessible address in the data sheet of the connected device and set it within this range.
[in]byte_countThe number of bytes to write. Refer to the write data size and boundaries in the data sheet of the connected device and specify within a range that does not exceed these.

◆ erase

fsp_err_t(* hyperbus_api_t::erase) (hyperbus_ctrl_t *p_ctrl, uint8_t *const p_device_address, uint32_t byte_count)

Erase a certain number of bytes of the flash.

Parameters
[in]p_ctrlPointer to a driver handle
[in]p_device_addressThe location in the flash device address space to start the erase from
[in]byte_countThe number of bytes to erase. Set to HYPERBUS_ERASE_SIZE_CHIP_ERASE to erase entire chip.

◆ statusGet

fsp_err_t(* hyperbus_api_t::statusGet) (hyperbus_ctrl_t *ctrl_t, hyperbus_status_t *const p_status)

Get the write or erase status of the flash.

Parameters
[in]p_ctrlPointer to a driver handle
[out]p_statusCurrent status of the HyperBus flash device stored here.

◆ autoCalibrate

fsp_err_t(* hyperbus_api_t::autoCalibrate) (hyperbus_ctrl_t *p_ctrl)

AutoCalibrate the HyperBus driver module. Expected to be used when auto-calibrating HyperRAM device.

Parameters
[in]p_ctrlPointer to a driver handle

◆ close

fsp_err_t(* hyperbus_api_t::close) (hyperbus_ctrl_t *ctrl_t)

Close the HyperBus driver module.

Parameters
[in]p_ctrlPointer to a driver handle

◆ hyperbus_instance_t

struct hyperbus_instance_t

This structure encompasses everything that is needed to use an instance of this interface.

Data Fields
hyperbus_ctrl_t * p_ctrl Pointer to the control structure for this instance.
hyperbus_cfg_t const * p_cfg Pointer to the configuration structure for this instance.
hyperbus_api_t const * p_api Pointer to the API structure for this instance.

Typedef Documentation

◆ hyperbus_ctrl_t

typedef void hyperbus_ctrl_t

HyperBus control block. Allocate an instance specific control block to pass into the HyperBus API calls.

Enumeration Type Documentation

◆ hyperbus_burst_type_t

Select the type of burst.

Enumerator
HYPERBUS_BURST_TYPE_WRAP 

Wrap burst.

HYPERBUS_BURST_TYPE_LINEAR 

Linear burst.

◆ hyperbus_space_select_t

Select access address space.

Enumerator
HYPERBUS_SPACE_SELECT_MEMORY_SPACE 

Access for memory space.

HYPERBUS_SPACE_SELECT_REGISTER_SPACE 

Access for register space.

◆ hyperbus_latency_count_t

Initial read/write latency.

Enumerator
HYPERBUS_LATENCY_COUNT_0 

No count.

HYPERBUS_LATENCY_COUNT_1 

Latency count 1.

HYPERBUS_LATENCY_COUNT_2 

Latency count 2.

HYPERBUS_LATENCY_COUNT_3 

Latency count 3.

HYPERBUS_LATENCY_COUNT_4 

Latency count 4.

HYPERBUS_LATENCY_COUNT_5 

Latency count 5.

HYPERBUS_LATENCY_COUNT_6 

Latency count 6.

HYPERBUS_LATENCY_COUNT_7 

Latency count 7.

HYPERBUS_LATENCY_COUNT_8 

Latency count 8.

HYPERBUS_LATENCY_COUNT_9 

Latency count 9.

HYPERBUS_LATENCY_COUNT_10 

Latency count 10.

HYPERBUS_LATENCY_COUNT_11 

Latency count 11.

HYPERBUS_LATENCY_COUNT_12 

Latency count 12.

HYPERBUS_LATENCY_COUNT_13 

Latency count 13.

HYPERBUS_LATENCY_COUNT_14 

Latency count 14.

HYPERBUS_LATENCY_COUNT_15 

Latency count 15.

HYPERBUS_LATENCY_COUNT_16 

Latency count 16.

HYPERBUS_LATENCY_COUNT_17 

Latency count 17.

HYPERBUS_LATENCY_COUNT_18 

Latency count 18.

HYPERBUS_LATENCY_COUNT_19 

Latency count 19.

HYPERBUS_LATENCY_COUNT_20 

Latency count 20.

HYPERBUS_LATENCY_COUNT_21 

Latency count 21.

HYPERBUS_LATENCY_COUNT_22 

Latency count 22.

HYPERBUS_LATENCY_COUNT_23 

Latency count 23.

HYPERBUS_LATENCY_COUNT_24 

Latency count 24.

HYPERBUS_LATENCY_COUNT_25 

Latency count 25.

HYPERBUS_LATENCY_COUNT_26 

Latency count 26.

HYPERBUS_LATENCY_COUNT_27 

Latency count 27.

HYPERBUS_LATENCY_COUNT_28 

Latency count 28.

HYPERBUS_LATENCY_COUNT_29 

Latency count 29.

HYPERBUS_LATENCY_COUNT_30 

Latency count 30.

HYPERBUS_LATENCY_COUNT_31 

Latency count 31.