HPM SDK
HPMicro Software Development Kit
hpm_romapi_xpi_nor_def.h File Reference
#include "hpm_common.h"
#include "hpm_romapi_xpi_def.h"

Go to the source code of this file.

Data Structures

struct  xpi_nor_config_option_t
 XPI NOR configuration option The ROM SW can detect the FLASH configuration based on the following structure specified by the end-user. More...
 
struct  device_mode_cfg_t
 Device Mode configuration structure. More...
 
struct  device_mode_param_t
 Device mode parameter structure. More...
 
struct  xpi_device_info_t
 XPI NOR device information structure. More...
 
struct  xpi_nor_config_t
 XPI NOR configuration structure. More...
 
union  flash_run_context_t
 FLASH runtime context structure. More...
 

Macros

#define XPI_NOR_CFG_TAG   0x524f4E58U
 
#define XPI_NOR_CFG_OPTION_TAG   (0xfcf90U)
 XPI NOR option tag. More...
 

Enumerations

enum  {
  xpi_nor_property_total_size , xpi_nor_property_page_size , xpi_nor_property_sector_size , xpi_nor_property_block_size ,
  xpi_nor_property_max = xpi_nor_property_block_size
}
 XPI NOR properties. More...
 
enum  { xpi_nor_clk_safe_clk_freq = 1 }
 XPI NOR safe frequency option. More...
 
enum  { xpi_nor_option_misc_spi_only = 1 , xpi_nor_option_misc_internal_loopback = 2 , xpi_nor_option_misc_ext_dqs = 3 }
 XPI NOR miscellaneous options. More...
 
enum  {
  xpi_nor_connection_sel_chna_cs0 , xpi_nor_connection_sel_chnb_cs0 , xpi_nor_connection_sel_chna_cs0_chnb_cs0 , xpi_nor_connection_sel_chna_cs0_cs1 ,
  xpi_nor_connection_sel_chnb_cs0_cs1
}
 XPI NOR connection option. More...
 
enum  xpi_nor_quad_enable_seq_t {
  xpi_nor_quad_en_auto_or_ignore = 0U , xpi_nor_quad_en_set_bit6_in_status_reg1 = 1U , xpi_nor_quad_en_set_bit1_in_status_reg2 = 2U , xpi_nor_quad_en_set_bit7_in_status_reg2 = 3U ,
  xpi_nor_quad_en_set_bi1_in_status_reg2_via_0x31_cmd = 4U
}
 QE bit enable sequence option. More...
 
enum  xpi_working_mode_t { xpi_working_mode_extend_spi , xpi_working_mode_xpi , xpi_working_mode_hyperbus }
 XPI working mode. More...
 
enum  xpi_nor_cfg_cmd_type_t { xpi_nor_cfg_cmd_type_no_cfg = 0U , xpi_nor_cfg_cmd_type_generic = 1U , xpi_nor_cfg_cmd_type_spi2xpi = 2U , xpi_nor_cfg_cmd_type_xpi2spi = 3U }
 XPI NOR configuration command type. More...
 
enum  xpi_nor_probe_t {
  xpi_nor_probe_sfdp_sdr = 0U , xpi_nor_probe_sfdp_ddr = 1U , xpi_nor_quad_read_0xeb = 2U , xpi_nor_dual_read_0xbb = 3U ,
  xpi_nor_hyperbus_1v8 = 4U , xpi_nor_hyperbus_3v0 = 5U , xpi_nor_octabus_ddr = 6U , xpi_nor_octabus_sdr = 7U ,
  xpi_nor_xccela_ddr = 8U , xpi_nor_xccela_sdr = 9U , xpi_nor_ecoxip_ddr = 10U , xpi_nor_ecoxip_sdr = 11U
}
 XPI NOR probe options. More...
 
enum  xpi_std_nor_instr_idx_t {
  xpi_std_nor_seq_idx_read = 0U , xpi_std_nor_seq_idx_page_program = 1U , xpi_std_nor_seq_idx_read_status = 2U , xpi_std_nor_seq_idx_read_status_xpi = 3U ,
  xpi_std_nor_seq_idx_write_enable = 4U , xpi_std_nor_seq_idx_write_enable_xpi = 5U , xpi_std_nor_seq_idx_erase_sector = 6U , xpi_std_nor_seq_idx_erase_block = 7U ,
  xpi_std_nor_seq_idx_erase_chip = 8U , xpi_std_nor_seq_idx_max = 9
}
 Standard XPI NOR seuqnce index definitions. More...
 
enum  { serial_nor_sector_size_4kb , serial_nor_sector_size_32kb , serial_nor_sector_size_64kb , serial_nor_sector_size_256kb }
 Sector size options. More...
 
enum  { serial_nor_erase_type_4kb , serial_nor_erase_type_32kb , serial_nor_erase_type_64kb , serial_nor_erase_type_256kb }
 Sector erase command options. More...
 
enum  { flash_size_4mb , flash_size_8mb , flash_size_16mb }
 FLASH size options. More...
 
enum  { status_xpi_nor_sfdp_not_found = ((uint32_t)( status_group_xpi_nor )*1000U + (uint32_t)( 0 )) , status_xpi_nor_ddr_read_dummy_cycle_probe_failed = ((uint32_t)( status_group_xpi_nor )*1000U + (uint32_t)( 1 )) , status_xpi_nor_flash_not_found = ((uint32_t)( status_group_xpi_nor )*1000U + (uint32_t)( 2 )) }
 XPI NOR API error codes. More...