Go to the source code of this file.
|
| enum | {
status_spi_nor_sfdp_not_found = MAKE_STATUS(status_group_spi_nor_flash, 0)
, status_spi_nor_ddr_read_dummy_cycle_probe_failed = MAKE_STATUS(status_group_spi_nor_flash, 1)
, status_spi_nor_flash_not_found = MAKE_STATUS(status_group_spi_nor_flash, 2)
, status_spi_nor_flash_para_err = MAKE_STATUS(status_group_spi_nor_flash, 3)
,
status_spi_nor_flash_is_busy = MAKE_STATUS(status_group_spi_nor_flash, 4)
, status_spi_nor_flash_not_qe_bit_in_sfdp = MAKE_STATUS(status_group_spi_nor_flash, 5)
} |
| | spi nor API error codes More...
|
| |
|
| 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_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_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_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...
|
| |
◆ anonymous enum
spi nor API error codes
| Enumerator |
|---|
| status_spi_nor_sfdp_not_found | SFDP table was not found
|
| status_spi_nor_ddr_read_dummy_cycle_probe_failed | Probing Dummy cyles for DDR read failed
|
| status_spi_nor_flash_not_found | FLASH was not detected
|
| status_spi_nor_flash_para_err | |
| status_spi_nor_flash_is_busy | |
| status_spi_nor_flash_not_qe_bit_in_sfdp | |
◆ hpm_serial_nor_erase_block_blocking()
erase the serial nor flash block using blocking transfer
- Note
- the erase block address must be block alignment
- Parameters
-
| [in] | host | the serial nor context |
| [in] | block_addr | the serial nor flash block address |
- Returns
- hpm_stat_t: status_success if erase block success
◆ hpm_serial_nor_erase_block_nonblocking()
erase the serial nor flash block using nonblocking transfer
- Note
- the erase block address must be block alignment, it'not wait flash busy status.
- Parameters
-
| [in] | host | the serial nor context |
| [in] | block_addr | the serial nor flash block address |
- Returns
- hpm_stat_t: status_success if erase block success
◆ hpm_serial_nor_erase_blocking()
erase the serial nor flash specified start address and length using blocking transfer
- Note
- the erase sector address must be sector alignment
- Parameters
-
| [in] | host | the serial nor context |
| [in] | sector_addr | the serial nor flash sector address |
- Returns
- hpm_stat_t: status_success if erase success
◆ hpm_serial_nor_erase_chip()
erase the serial nor flash chip
- Parameters
-
| [in] | host | the serial nor context |
- Returns
- hpm_stat_t: status_success if erase chip success
◆ hpm_serial_nor_erase_sector_blocking()
erase the serial nor flash sector using blocking transfer
- Note
- the erase sector address must be sector alignment
- Parameters
-
| [in] | host | the serial nor context |
| [in] | sector_addr | the serial nor flash sector address |
- Returns
- hpm_stat_t: status_success if erase sector success
◆ hpm_serial_nor_erase_sector_nonblocking()
erase the serial nor flash sector using nonblocking transfer
- Note
- the erase sector address must be sector alignment, it'not wait flash busy status.
- Parameters
-
| [in] | host | the serial nor context |
| [in] | sector_addr | the serial nor flash sector address |
- Returns
- hpm_stat_t: status_success if erase sector success
◆ hpm_serial_nor_get_info()
get the serial nor flash information
- Parameters
-
| [in] | host | the serial nor context |
| [out] | info | serial_nor_flash_info_t |
- Returns
- hpm_stat_t: status_success if get information success
◆ hpm_serial_nor_init()
the serial nor flash initialization
- Parameters
-
| [in] | host | the serial nor context |
| [out] | info | serial_nor_flash_info_t |
- Returns
- hpm_stat_t: status_success if initialization success
◆ hpm_serial_nor_is_busy()
determine whether the serial nor flash is busy
- Parameters
-
| [in] | host | the serial nor context |
- Returns
- hpm_stat_t: status_spi_nor_flash_is_busy if the serial nor flash is busy
◆ hpm_serial_nor_page_program_nonblocking()
| 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
- Parameters
-
| [in] | host | the serial nor context |
| [in] | buf | the data source pointer |
| [in] | data_len | the data length |
| [in] | address | the serial nor flash programming address |
- Returns
- hpm_stat_t: status_success if program success
◆ hpm_serial_nor_program_blocking()
program data to the specified serial nor flash address using blocking transfer
- Parameters
-
| [in] | host | the serial nor context |
| [in] | buf | the data source pointer |
| [in] | data_len | the data length |
| [in] | address | the serial nor flash programming address |
- Returns
- hpm_stat_t: status_success if program success
◆ hpm_serial_nor_read()
read the data of specified serial nor flash address
- Parameters
-
| [in] | host | the serial nor context |
| [in] | buf | the data source pointer |
| [in] | data_len | the data length |
| [in] | address | the serial nor flash reading address |
- Returns
- hpm_stat_t: status_success if read success
◆ hpm_serial_nor_write_enable()
set serial nor flash write enable
- Parameters
-
| [in] | channel | serial nor flash channel |
- Returns
- hpm_stat_t: status_success if write enable success