Macros | |
| #define | SERIALNOR_CMD_PAGE_PROGRAM_1_1_4_3B (0x32U) |
| #define | SERIALNOR_CMD_READ_SDR_1_2_2_4B (0xBCU) |
| #define | SERIALNOR_CMD_READ_SDR_1_2_2_3B (0xBBU) |
| #define | SERIALNOR_CMD_READ_SDR_1_1_2_3B (0x3BU) |
| #define | SERIALNOR_CMD_READ_SDR_1_1_2_4B (0x3CU) |
| #define | SERIALNOR_CMD_WRITE_STATUS_REG3 (0x11U) |
| #define | SERIALNOR_CMD_READ_STATUS_REG3 (0x15U) |
| #define | kSERIALNOR_CMD_WRITE_STATUS_REG2_VIA_0X31 (0x31U) |
| #define | kSERIALNOR_CMD_READ_STATUS_REG2_VIA_0X31 (0x35U) |
| #define | MAX_24BIT_ADDRESSING_SIZE ((1UL << 24)) |
| #define | MAX_24BIT_ADDR_SIZE_IN_KBYTES ((1UL << 24) / SIZE_1KB) |
| #define | SPI_READ_SFDP_FREQUENCY (10000000U) |
Enumerations | |
| enum | spi_nor_quad_enable_seq_t { spi_nor_quad_en_auto_or_ignore = 0U , spi_nor_quad_en_set_bit6_in_status_reg1 = 1U , spi_nor_quad_en_set_bit1_in_status_reg2 = 2U , spi_nor_quad_en_set_bit7_in_status_reg2 = 3U , spi_nor_quad_en_set_bi1_in_status_reg2_via_0x31_cmd = 4U } |
| QE bit enable sequence option. More... | |
Functions | |
| static hpm_stat_t | hpm_serial_nor_read_sfdp_info (hpm_serial_nor_t *flash, jedec_info_table_t *tbl, bool address_shift_enable) |
| static hpm_stat_t | hpm_spi_get_read_para (hpm_serial_nor_t *flash, jedec_info_table_t *jedec_info) |
| static hpm_stat_t | hpm_spi_get_program_para (hpm_serial_nor_t *flash, jedec_info_table_t *jedec_info) |
| static hpm_stat_t | hpm_spi_nor_read_sfdp (hpm_serial_nor_t *flash, uint32_t addr, uint32_t *buffer, uint32_t bytes) |
| static hpm_stat_t | hpm_spi_nor_set_command (hpm_serial_nor_t *flash, uint8_t cmd) |
| static hpm_stat_t | get_page_sector_block_size_from_sfdp (hpm_serial_nor_info_t *config, jedec_info_table_t *tbl) |
| static hpm_stat_t | hpm_spi_nor_read_status_register (hpm_serial_nor_t *flash, uint8_t *reg_data, uint8_t status_reg) |
| static hpm_stat_t | hpm_spi_nor_write_status_register (hpm_serial_nor_t *flash, uint8_t reg_data, uint8_t status_reg) |
| static hpm_stat_t | prepare_quad_mode_enable_sequence (hpm_serial_nor_t *flash, jedec_info_table_t *jedec_info) |
| hpm_stat_t | hpm_serial_nor_is_busy (hpm_serial_nor_t *flash) |
| determine whether the serial nor flash is busy More... | |
| hpm_stat_t | hpm_serial_nor_write_enable (hpm_serial_nor_t *flash) |
| set serial nor flash write enable More... | |
| hpm_stat_t | hpm_serial_nor_erase_chip (hpm_serial_nor_t *flash) |
| erase the serial nor flash chip More... | |
| hpm_stat_t | hpm_serial_nor_erase_block_blocking (hpm_serial_nor_t *flash, uint32_t block_addr) |
| erase the serial nor flash block using blocking transfer More... | |
| hpm_stat_t | hpm_serial_nor_erase_sector_blocking (hpm_serial_nor_t *flash, uint32_t sector_addr) |
| erase the serial nor flash sector using blocking transfer More... | |
| hpm_stat_t | hpm_serial_nor_erase_block_nonblocking (hpm_serial_nor_t *flash, uint32_t block_addr) |
| erase the serial nor flash block using nonblocking transfer More... | |
| hpm_stat_t | hpm_serial_nor_erase_sector_nonblocking (hpm_serial_nor_t *flash, uint32_t sector_addr) |
| erase the serial nor flash sector using nonblocking transfer More... | |
| hpm_stat_t | hpm_serial_nor_erase_blocking (hpm_serial_nor_t *flash, uint32_t start, uint32_t length) |
| erase the serial nor flash specified start address and length using blocking transfer More... | |
| hpm_stat_t | hpm_serial_nor_program_blocking (hpm_serial_nor_t *flash, uint8_t *buf, uint32_t data_len, uint32_t address) |
| program data to the specified serial nor flash address using blocking transfer More... | |
| hpm_stat_t | hpm_serial_nor_page_program_nonblocking (hpm_serial_nor_t *flash, uint8_t *buf, uint32_t data_len, uint32_t address) |
| program data to the page nor flash address using nonblocking transfer More... | |
| hpm_stat_t | hpm_serial_nor_read (hpm_serial_nor_t *flash, uint8_t *buf, uint16_t data_len, uint32_t address) |
| read the data of specified serial nor flash address More... | |
| hpm_stat_t | hpm_serial_nor_init (hpm_serial_nor_t *flash, hpm_serial_nor_info_t *info) |
| the serial nor flash initialization More... | |
| hpm_stat_t | hpm_serial_nor_get_info (hpm_serial_nor_t *flash, hpm_serial_nor_info_t *info) |
| get the serial nor flash information More... | |
| #define kSERIALNOR_CMD_READ_STATUS_REG2_VIA_0X31 (0x35U) |
| #define kSERIALNOR_CMD_WRITE_STATUS_REG2_VIA_0X31 (0x31U) |
| #define MAX_24BIT_ADDR_SIZE_IN_KBYTES ((1UL << 24) / SIZE_1KB) |
| #define MAX_24BIT_ADDRESSING_SIZE ((1UL << 24)) |
| #define SERIALNOR_CMD_PAGE_PROGRAM_1_1_4_3B (0x32U) |
| #define SERIALNOR_CMD_READ_SDR_1_1_2_3B (0x3BU) |
| #define SERIALNOR_CMD_READ_SDR_1_1_2_4B (0x3CU) |
| #define SERIALNOR_CMD_READ_SDR_1_2_2_3B (0xBBU) |
| #define SERIALNOR_CMD_READ_SDR_1_2_2_4B (0xBCU) |
| #define SERIALNOR_CMD_READ_STATUS_REG3 (0x15U) |
| #define SERIALNOR_CMD_WRITE_STATUS_REG3 (0x11U) |
| #define SPI_READ_SFDP_FREQUENCY (10000000U) |
QE bit enable sequence option.
|
static |
| hpm_stat_t hpm_serial_nor_erase_block_blocking | ( | hpm_serial_nor_t * | flash, |
| uint32_t | block_addr | ||
| ) |
erase the serial nor flash block using blocking transfer
| [in] | flash | the serial nor context |
| [in] | block_addr | the serial nor flash block address |
| hpm_stat_t hpm_serial_nor_erase_block_nonblocking | ( | hpm_serial_nor_t * | flash, |
| uint32_t | block_addr | ||
| ) |
erase the serial nor flash block using nonblocking transfer
| [in] | flash | the serial nor context |
| [in] | block_addr | the serial nor flash block address |
| hpm_stat_t hpm_serial_nor_erase_blocking | ( | hpm_serial_nor_t * | flash, |
| uint32_t | start, | ||
| uint32_t | length | ||
| ) |
erase the serial nor flash specified start address and length using blocking transfer
| [in] | flash | the serial nor context |
| [in] | sector_addr | the serial nor flash sector address |
| hpm_stat_t hpm_serial_nor_erase_chip | ( | hpm_serial_nor_t * | flash | ) |
erase the serial nor flash chip
| [in] | flash | the serial nor context |
| hpm_stat_t hpm_serial_nor_erase_sector_blocking | ( | hpm_serial_nor_t * | flash, |
| uint32_t | sector_addr | ||
| ) |
erase the serial nor flash sector using blocking transfer
| [in] | flash | the serial nor context |
| [in] | sector_addr | the serial nor flash sector address |
| hpm_stat_t hpm_serial_nor_erase_sector_nonblocking | ( | hpm_serial_nor_t * | flash, |
| uint32_t | sector_addr | ||
| ) |
erase the serial nor flash sector using nonblocking transfer
| [in] | flash | the serial nor context |
| [in] | sector_addr | the serial nor flash sector address |
| hpm_stat_t hpm_serial_nor_get_info | ( | hpm_serial_nor_t * | flash, |
| hpm_serial_nor_info_t * | info | ||
| ) |
get the serial nor flash information
| [in] | flash | the serial nor context |
| [out] | info | serial_nor_flash_info_t |
| hpm_stat_t hpm_serial_nor_init | ( | hpm_serial_nor_t * | flash, |
| hpm_serial_nor_info_t * | info | ||
| ) |
the serial nor flash initialization
| [in] | flash | the serial nor context |
| [out] | info | serial_nor_flash_info_t |
| hpm_stat_t hpm_serial_nor_is_busy | ( | hpm_serial_nor_t * | flash | ) |
determine whether the serial nor flash is busy
| [in] | flash | the serial nor context |
| hpm_stat_t hpm_serial_nor_page_program_nonblocking | ( | hpm_serial_nor_t * | flash, |
| uint8_t * | buf, | ||
| uint32_t | data_len, | ||
| uint32_t | address | ||
| ) |
program data to the page nor flash address using nonblocking transfer
| [in] | flash | the serial nor context |
| [in] | buf | the data source pointer |
| [in] | data_len | the data length |
| [in] | address | the serial nor flash programming address |
| hpm_stat_t hpm_serial_nor_program_blocking | ( | hpm_serial_nor_t * | flash, |
| uint8_t * | buf, | ||
| uint32_t | data_len, | ||
| uint32_t | address | ||
| ) |
program data to the specified serial nor flash address using blocking transfer
| [in] | flash | the serial nor context |
| [in] | buf | the data source pointer |
| [in] | data_len | the data length |
| [in] | address | the serial nor flash programming address |
| hpm_stat_t hpm_serial_nor_read | ( | hpm_serial_nor_t * | flash, |
| uint8_t * | buf, | ||
| uint16_t | data_len, | ||
| uint32_t | address | ||
| ) |
read the data of specified serial nor flash address
| [in] | flash | the serial nor context |
| [in] | buf | the data source pointer |
| [in] | data_len | the data length |
| [in] | address | the serial nor flash reading address |
|
static |
| hpm_stat_t hpm_serial_nor_write_enable | ( | hpm_serial_nor_t * | flash | ) |
set serial nor flash write enable
| [in] | channel | serial nor flash channel |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |