HPM SDK
HPMicro Software Development Kit
ROM APIs for HPM5E31

ROM APIs. More...

Data Structures

union  api_boot_arg_t
 Enter Bootloader API argument. More...
 
struct  exip_region_param_t
 
struct  exip_region_context_t
 
struct  otp_driver_interface_t
 OTP driver interface. More...
 
struct  xpi_ram_driver_interface_t
 XPI RAM driver interface. More...
 
struct  exip_driver_interface_t
 EXIP driver interface. More...
 
struct  bootloader_api_table_t
 Bootloader API table. More...
 

Macros

#define HPM_XPI0_BASE   (0xF3000000UL)
 
#define HPM_XPI0   ((XPI_Type *) HPM_XPI0_BASE)
 
#define API_BOOT_TAG   (0xEBU)
 
#define API_BOOT_SRC_OTP   (0U)
 
#define API_BOOT_SRC_PRIMARY   (1U)
 
#define API_BOOT_SRC_SERIAL_BOOT   (2U)
 
#define API_BOOT_SRC_ISP   (3U)
 
#define API_BOOT_PERIPH_AUTO   (0U)
 
#define API_BOOT_PERIPH_UART   (1U)
 
#define API_BOOT_PERIPH_USBHID   (2U)
 
#define ROM_API_TABLE_ROOT   ((const bootloader_api_table_t *)0x2001FF00U)
 

Functions

static hpm_stat_t rom_enter_bootloader (void *ctx)
 Eneter specified Boot mode. More...
 
static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_get_config (XPI_Type *base, xpi_nor_config_t *nor_cfg, xpi_nor_config_option_t *cfg_option)
 Get XPI NOR configuration via cfg_option. More...
 
static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_init (XPI_Type *base, xpi_nor_config_t *nor_config)
 Initialize XPI NOR based on nor_config. More...
 
static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_erase (XPI_Type *base, xpi_xfer_channel_t channel, const xpi_nor_config_t *nor_config, uint32_t start, uint32_t length)
 Erase specified FLASH region. More...
 
static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_erase_sector (XPI_Type *base, xpi_xfer_channel_t channel, const xpi_nor_config_t *nor_config, uint32_t start)
 Erase specified FLASH sector in blocking way. More...
 
static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_erase_sector_nonblocking (XPI_Type *base, xpi_xfer_channel_t channel, const xpi_nor_config_t *nor_config, uint32_t start)
 Erase specified FLASH sector in non-blocking way. More...
 
static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_erase_block (XPI_Type *base, xpi_xfer_channel_t channel, const xpi_nor_config_t *nor_config, uint32_t start)
 Erase specified FLASH blcok in blocking way. More...
 
static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_erase_block_nonblocking (XPI_Type *base, xpi_xfer_channel_t channel, const xpi_nor_config_t *nor_config, uint32_t start)
 Erase specified FLASH blcok in non-blocking way. More...
 
static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_erase_chip (XPI_Type *base, xpi_xfer_channel_t channel, const xpi_nor_config_t *nor_config)
 Erase the whole FLASH in blocking way. More...
 
static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_erase_chip_nonblocking (XPI_Type *base, xpi_xfer_channel_t channel, const xpi_nor_config_t *nor_config)
 Erase the whole FLASH in non-blocking way. More...
 
static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_program (XPI_Type *base, xpi_xfer_channel_t channel, const xpi_nor_config_t *nor_config, const uint32_t *src, uint32_t dst_addr, uint32_t length)
 Program data to specified FLASH address in blocking way. More...
 
static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_page_program_nonblocking (XPI_Type *base, xpi_xfer_channel_t channel, const xpi_nor_config_t *nor_config, const uint32_t *src, uint32_t dst_addr, uint32_t length)
 Page-Program data to specified FLASH address in non-blocking way. More...
 
static hpm_stat_t rom_xpi_nor_read (XPI_Type *base, xpi_xfer_channel_t channel, const xpi_nor_config_t *nor_config, uint32_t *dst, uint32_t start, uint32_t length)
 Read data from specified FLASH address. More...
 
static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_auto_config (XPI_Type *base, xpi_nor_config_t *config, xpi_nor_config_option_t *cfg_option)
 Automatically configure XPI NOR based on cfg_option. More...
 
static hpm_stat_t rom_xpi_nor_get_property (XPI_Type *base, xpi_nor_config_t *nor_cfg, uint32_t property_id, uint32_t *value)
 Get XPI NOR properties. More...
 
static hpm_stat_t rom_xpi_nor_get_status (XPI_Type *base, xpi_xfer_channel_t channel, const xpi_nor_config_t *nor_config, uint32_t addr, uint16_t *out_status)
 Return the status register value on XPI NOR FLASH. More...
 
static void rom_xpi_nor_power_on_sip_flash (XPI_Type *base)
 Power on the SIP FLASH. More...
 
static void rom_xpi_nor_power_off_sip_flash (XPI_Type *base)
 Power off the SIP FLASH. More...
 
static void rom_xpi_nor_enable_hybrid_mode (XPI_Type *base)
 Enable Hybrid XPI mode. More...
 
static void rom_xpi_nor_disable_hybrid_mode (XPI_Type *base)
 Disable Hybrid XPI mode. More...
 
static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_post_erase_sector_nonblocking (XPI_Type *base, xpi_xfer_channel_t chn, xpi_nor_config_t *nor_cfg, uint32_t addr)
 Post Erase Sector Nonblocking API (required only if Hybrid XPI mode is used) More...
 
static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_post_erase_block_nonblocking (XPI_Type *base, xpi_xfer_channel_t chn, xpi_nor_config_t *nor_cfg, uint32_t addr)
 Post Erase Block Nonblocking API (required only if Hybrid XPI mode is used) More...
 
static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_post_erase_chip_nonblocking (XPI_Type *base, xpi_xfer_channel_t chn, xpi_nor_config_t *nor_cfg)
 Post Erase Chip Nonblocking API (required only if Hybrid XPI mode is used) More...
 
static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_post_program_nonblocking (XPI_Type *base, xpi_xfer_channel_t chn, xpi_nor_config_t *nor_cfg, const uint32_t *src, uint32_t dst_addr, uint32_t length)
 Post Page Program Nonblocking API (required only if Hybrid XPI mode is used) More...
 
static ATTR_RAMFUNC bool rom_xpi_nor_remap_config (XPI_Type *base, uint32_t start, uint32_t len, uint32_t offset)
 Configure the XPI Address Remapping Logic. More...
 
static ATTR_RAMFUNC void rom_xpi_nor_remap_disable (XPI_Type *base)
 Disable XPI Remapping logic. More...
 
static ATTR_RAMFUNC bool rom_xpi_nor_is_remap_enabled (XPI_Type *base)
 Check whether XPI Remapping is enabled. More...
 
static ATTR_RAMFUNC bool rom_xpi_nor_exip_region_config (XPI_Type *base, uint32_t index, exip_region_param_t *param)
 Configure Specified EXiP Region. More...
 
static ATTR_RAMFUNC void rom_xpi_nor_exip_region_disable (XPI_Type *base, uint32_t index)
 Disable EXiP Feature on specified EXiP Region. More...
 
static ATTR_RAMFUNC void rom_xpi_nor_exip_enable (XPI_Type *base)
 Enable global EXiP logic. More...
 
static ATTR_RAMFUNC void rom_xpi_nor_exip_disable (XPI_Type *base)
 Disable global EXiP logic. More...
 
static hpm_stat_t rom_xpi_ram_get_config (XPI_Type *base, xpi_ram_config_t *ram_cfg, xpi_ram_config_option_t *cfg_option)
 Get XPI RAM configuration based on cfg_option. More...
 
static hpm_stat_t rom_xpi_ram_init (XPI_Type *base, xpi_ram_config_t *ram_cfg)
 Initialize XPI RAM. More...
 

Detailed Description

ROM APIs.

Macro Definition Documentation

◆ API_BOOT_PERIPH_AUTO

#define API_BOOT_PERIPH_AUTO   (0U)

◆ API_BOOT_PERIPH_UART

#define API_BOOT_PERIPH_UART   (1U)

◆ API_BOOT_PERIPH_USBHID

#define API_BOOT_PERIPH_USBHID   (2U)

◆ API_BOOT_SRC_ISP

◆ API_BOOT_SRC_OTP

◆ API_BOOT_SRC_PRIMARY

#define API_BOOT_SRC_PRIMARY   (1U)

◆ API_BOOT_SRC_SERIAL_BOOT

#define API_BOOT_SRC_SERIAL_BOOT   (2U)

◆ API_BOOT_TAG

◆ HPM_XPI0

◆ HPM_XPI0_BASE

#define HPM_XPI0_BASE   (0xF3000000UL)

◆ ROM_API_TABLE_ROOT

Function Documentation

◆ rom_enter_bootloader()

static hpm_stat_t rom_enter_bootloader ( void *  ctx)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Eneter specified Boot mode.

Parameters
[in]ctxEnter bootloader context
Return values
status_invalidInvalid parameters were detected

◆ rom_xpi_nor_auto_config()

static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_auto_config ( XPI_Type base,
xpi_nor_config_t config,
xpi_nor_config_option_t cfg_option 
)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Automatically configure XPI NOR based on cfg_option.

Parameters
[in]baseXPI base address
[out]configXPI NOR configuration structure
[in]cfg_optionXPI NOR configuration option
Returns
API execution status

◆ rom_xpi_nor_disable_hybrid_mode()

static void rom_xpi_nor_disable_hybrid_mode ( XPI_Type base)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Disable Hybrid XPI mode.

Parameters
[in]baseXPI base address

◆ rom_xpi_nor_enable_hybrid_mode()

static void rom_xpi_nor_enable_hybrid_mode ( XPI_Type base)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Enable Hybrid XPI mode.

Parameters
[in]baseXPI base address

◆ rom_xpi_nor_erase()

static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_erase ( XPI_Type base,
xpi_xfer_channel_t  channel,
const xpi_nor_config_t nor_config,
uint32_t  start,
uint32_t  length 
)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Erase specified FLASH region.

Parameters
[in]baseXPI base address
[in]channelXPI transfer channel
[in]nor_configXPI nOR configuration
[in]startErase address start address
[in]lengthRegion size to be erased
Returns
API execution status

◆ rom_xpi_nor_erase_block()

static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_erase_block ( XPI_Type base,
xpi_xfer_channel_t  channel,
const xpi_nor_config_t nor_config,
uint32_t  start 
)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Erase specified FLASH blcok in blocking way.

Parameters
[in]baseXPI base address
[in]channelXPI transfer channel
[in]nor_configXPI NOR configuration
[in]startBlock address
Returns
API execution status

◆ rom_xpi_nor_erase_block_nonblocking()

static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_erase_block_nonblocking ( XPI_Type base,
xpi_xfer_channel_t  channel,
const xpi_nor_config_t nor_config,
uint32_t  start 
)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Erase specified FLASH blcok in non-blocking way.

Parameters
[in]baseXPI base address
[in]channelXPI transfer channel
[in]nor_configXPI NOR configuration
[in]startBlock address
Returns
API execution status

◆ rom_xpi_nor_erase_chip()

static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_erase_chip ( XPI_Type base,
xpi_xfer_channel_t  channel,
const xpi_nor_config_t nor_config 
)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Erase the whole FLASH in blocking way.

Parameters
[in]baseXPI base address
[in]channelXPI transfer channel
[in]nor_configXPI NOR configuration
Returns
API execution status

◆ rom_xpi_nor_erase_chip_nonblocking()

static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_erase_chip_nonblocking ( XPI_Type base,
xpi_xfer_channel_t  channel,
const xpi_nor_config_t nor_config 
)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Erase the whole FLASH in non-blocking way.

Parameters
[in]baseXPI base address
[in]channelXPI transfer channel
[in]nor_configXPI NOR configuration
Returns
API execution status

◆ rom_xpi_nor_erase_sector()

static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_erase_sector ( XPI_Type base,
xpi_xfer_channel_t  channel,
const xpi_nor_config_t nor_config,
uint32_t  start 
)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Erase specified FLASH sector in blocking way.

Parameters
[in]baseXPI base address
[in]channelXPI transfer channel
[in]nor_configXPI NOR configuration
[in]startSector address
Returns
API execution status

◆ rom_xpi_nor_erase_sector_nonblocking()

static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_erase_sector_nonblocking ( XPI_Type base,
xpi_xfer_channel_t  channel,
const xpi_nor_config_t nor_config,
uint32_t  start 
)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Erase specified FLASH sector in non-blocking way.

Parameters
[in]baseXPI base address
[in]channelXPI transfer channel
[in]nor_configXPI NOR configuration
[in]startSector address
Returns
API execution status

◆ rom_xpi_nor_exip_disable()

static ATTR_RAMFUNC void rom_xpi_nor_exip_disable ( XPI_Type base)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Disable global EXiP logic.

Parameters
[in]baseXPI base address

◆ rom_xpi_nor_exip_enable()

static ATTR_RAMFUNC void rom_xpi_nor_exip_enable ( XPI_Type base)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Enable global EXiP logic.

Parameters
[in]baseXPI base address

◆ rom_xpi_nor_exip_region_config()

static ATTR_RAMFUNC bool rom_xpi_nor_exip_region_config ( XPI_Type base,
uint32_t  index,
exip_region_param_t param 
)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Configure Specified EXiP Region.

Parameters
[in]baseXPI base address
[in]indexEXiP Region index
[in]paramExiP Region Parameter
Return values
trueAll parameters are valid
falseAny parameter is invalid

◆ rom_xpi_nor_exip_region_disable()

static ATTR_RAMFUNC void rom_xpi_nor_exip_region_disable ( XPI_Type base,
uint32_t  index 
)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Disable EXiP Feature on specified EXiP Region.

Parameters
[in]baseXPI base address
[in]indexEXiP Region index

◆ rom_xpi_nor_get_config()

static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_get_config ( XPI_Type base,
xpi_nor_config_t nor_cfg,
xpi_nor_config_option_t cfg_option 
)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Get XPI NOR configuration via cfg_option.

Parameters
[in]baseXPI base address
[out]nor_cfgXPI NOR configuration structure
[in]cfg_optionXPI NOR configuration option
Returns
API execution status

◆ rom_xpi_nor_get_property()

static hpm_stat_t rom_xpi_nor_get_property ( XPI_Type base,
xpi_nor_config_t nor_cfg,
uint32_t  property_id,
uint32_t *  value 
)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Get XPI NOR properties.

Parameters
[in]baseXPI base address
[in]nor_cfgXPI NOR configuration structure
[in]property_id
[out]valueproperty value retrieved by this API
Returns
API execution status

◆ rom_xpi_nor_get_status()

static hpm_stat_t rom_xpi_nor_get_status ( XPI_Type base,
xpi_xfer_channel_t  channel,
const xpi_nor_config_t nor_config,
uint32_t  addr,
uint16_t *  out_status 
)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Return the status register value on XPI NOR FLASH.

Parameters
[in]baseXPI base address
[in]channelXPI transfer channel
[in]nor_configXPI NOR configuration
[in]addrFLASH address offset
[out]out_statusFLASH status register value
Returns
API execution status

◆ rom_xpi_nor_init()

static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_init ( XPI_Type base,
xpi_nor_config_t nor_config 
)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Initialize XPI NOR based on nor_config.

Parameters
[in]baseXPI base address
[in]nor_configXPI NOR configuration
Returns
API execution status

◆ rom_xpi_nor_is_remap_enabled()

static ATTR_RAMFUNC bool rom_xpi_nor_is_remap_enabled ( XPI_Type base)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Check whether XPI Remapping is enabled.

Parameters
[in]baseXPI base address
Return values
trueRemapping logic is enabled
falseRemapping logic is disabled

◆ rom_xpi_nor_page_program_nonblocking()

static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_page_program_nonblocking ( XPI_Type base,
xpi_xfer_channel_t  channel,
const xpi_nor_config_t nor_config,
const uint32_t *  src,
uint32_t  dst_addr,
uint32_t  length 
)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Page-Program data to specified FLASH address in non-blocking way.

Parameters
[in]baseXPI base address
[in]channelXPI transfer channel
[in]nor_configXPI NOR configuration
[in]srcdata source address
[in]dst_addrDestination FLASH address
[in]lengthlength of data to be programmed
Returns
API execution status

◆ rom_xpi_nor_post_erase_block_nonblocking()

static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_post_erase_block_nonblocking ( XPI_Type base,
xpi_xfer_channel_t  chn,
xpi_nor_config_t nor_cfg,
uint32_t  addr 
)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Post Erase Block Nonblocking API (required only if Hybrid XPI mode is used)

Parameters
[in]baseXPI base address
[in]chnXPI channel
[in]nor_cfgXPI NOR configuration context
[in]addrSector address
Returns
Operation status

◆ rom_xpi_nor_post_erase_chip_nonblocking()

static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_post_erase_chip_nonblocking ( XPI_Type base,
xpi_xfer_channel_t  chn,
xpi_nor_config_t nor_cfg 
)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Post Erase Chip Nonblocking API (required only if Hybrid XPI mode is used)

Parameters
[in]baseXPI base address
[in]chnXPI channel
[in]nor_cfgXPI NOR configuration context
Returns
Operation status

◆ rom_xpi_nor_post_erase_sector_nonblocking()

static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_post_erase_sector_nonblocking ( XPI_Type base,
xpi_xfer_channel_t  chn,
xpi_nor_config_t nor_cfg,
uint32_t  addr 
)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Post Erase Sector Nonblocking API (required only if Hybrid XPI mode is used)

Parameters
[in]baseXPI base address
[in]chnXPI channel
[in]nor_cfgXPI NOR configuration context
[in]addrSector address
Returns
Operation status

◆ rom_xpi_nor_post_program_nonblocking()

static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_post_program_nonblocking ( XPI_Type base,
xpi_xfer_channel_t  chn,
xpi_nor_config_t nor_cfg,
const uint32_t *  src,
uint32_t  dst_addr,
uint32_t  length 
)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Post Page Program Nonblocking API (required only if Hybrid XPI mode is used)

Parameters
[in]baseXPI base address
[in]chnXPI channel
[in]nor_cfgXPI NOR configuration context
[in]srcData source pointer
[in]dst_addrDestination address
[in]lengthSize of bytes to be written

◆ rom_xpi_nor_power_off_sip_flash()

static void rom_xpi_nor_power_off_sip_flash ( XPI_Type base)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Power off the SIP FLASH.

Parameters
[in]baseXPI base address

◆ rom_xpi_nor_power_on_sip_flash()

static void rom_xpi_nor_power_on_sip_flash ( XPI_Type base)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Power on the SIP FLASH.

Parameters
[in]baseXPI base address

◆ rom_xpi_nor_program()

static ATTR_RAMFUNC hpm_stat_t rom_xpi_nor_program ( XPI_Type base,
xpi_xfer_channel_t  channel,
const xpi_nor_config_t nor_config,
const uint32_t *  src,
uint32_t  dst_addr,
uint32_t  length 
)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Program data to specified FLASH address in blocking way.

Parameters
[in]baseXPI base address
[in]channelXPI transfer channel
[in]nor_configXPI NOR configuration
[in]srcdata source address
[in]dst_addrDestination FLASH address
[in]lengthlength of data to be programmed
Returns
API execution status

◆ rom_xpi_nor_read()

static hpm_stat_t rom_xpi_nor_read ( XPI_Type base,
xpi_xfer_channel_t  channel,
const xpi_nor_config_t nor_config,
uint32_t *  dst,
uint32_t  start,
uint32_t  length 
)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Read data from specified FLASH address.

Parameters
[in]baseXPI base address
[in]channelXPI transfer channel
[in]nor_configXPI NOR configuration
[in]dstMemory start address to store the data read out from FLASH
[in]startFLASH address for data read
[in]lengthlength of data to be read out
Returns
API execution address

◆ rom_xpi_nor_remap_config()

static ATTR_RAMFUNC bool rom_xpi_nor_remap_config ( XPI_Type base,
uint32_t  start,
uint32_t  len,
uint32_t  offset 
)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Configure the XPI Address Remapping Logic.

Parameters
[in]baseXPI base address
[in]startStart Address (memory mapped address)
[in]lenSize for the remapping region
[in]offsetRelative address based on parameter "start"
Return values
trueis all parameters are valid
falseif any parameter is invalid

◆ rom_xpi_nor_remap_disable()

static ATTR_RAMFUNC void rom_xpi_nor_remap_disable ( XPI_Type base)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Disable XPI Remapping logic.

Parameters
[in]baseXPI base address

◆ rom_xpi_ram_get_config()

static hpm_stat_t rom_xpi_ram_get_config ( XPI_Type base,
xpi_ram_config_t ram_cfg,
xpi_ram_config_option_t cfg_option 
)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Get XPI RAM configuration based on cfg_option.

Parameters
[in]baseXPI base address
[out]ram_cfgXPI RAM configuration structure
[in]cfg_optionXPI RAM configuration option
Returns
API execution status

◆ rom_xpi_ram_init()

static hpm_stat_t rom_xpi_ram_init ( XPI_Type base,
xpi_ram_config_t ram_cfg 
)
inlinestatic

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/soc/HPM5E00/HPM5E31/hpm_romapi.h>

Initialize XPI RAM.

Parameters
[in]baseXPI base address
[in]ram_cfgXPI ram configuration
Returns
API execution status