OpenOCD
flash_sector Struct Reference

Describes the geometry and status of a single flash sector within a flash bank. More...

Data Fields

int is_erased
 Indication of erasure status: 0 = not erased, 1 = erased, other = unknown. More...
 
int is_protected
 Indication of protection status: 0 = unprotected/unlocked, 1 = protected/locked, other = unknown. More...
 
uint32_t offset
 Bus offset from start of the flash chip (in bytes). More...
 
uint32_t size
 Number of bytes in this flash sector. More...
 

Detailed Description

Describes the geometry and status of a single flash sector within a flash bank.

A single bank typically consists of multiple sectors, each of which can be erased and protected independently.

Definition at line 28 of file nor/core.h.

Field Documentation

◆ is_erased

int flash_sector::is_erased

Indication of erasure status: 0 = not erased, 1 = erased, other = unknown.

Set by flash_driver_s::erase_check only.

This information must be considered stale immediately. Don't set it in flash_driver_s::erase or a device mass_erase Don't clear it in flash_driver_s::write The flag is not used in a protection block

Definition at line 42 of file nor/core.h.

Referenced by alloc_block_array(), at91sam7_read_part_info(), ath79_probe(), COMMAND_HANDLER(), fespi_probe(), FLASH_BANK_COMMAND_HANDLER(), flash_set_dirty(), jtagspi_probe(), lpcspifi_probe(), mrvlqspi_probe(), nrf5_erase_page(), s6e2cc_init_sector(), sh_qspi_probe(), stmqspi_probe(), and stmsmi_probe().

◆ is_protected

int flash_sector::is_protected

Indication of protection status: 0 = unprotected/unlocked, 1 = protected/locked, other = unknown.

Set by flash_driver_s::protect_check.

This information must be considered stale immediately. A million things could make it stale: power cycle, reset of target, code running on target, etc.

If a flash_bank uses an extra array of protection blocks, protection flag is not valid in sector array

Definition at line 55 of file nor/core.h.

Referenced by alloc_block_array(), at91sam7_read_part_info(), ath79_probe(), ath79_write(), COMMAND_HANDLER(), fespi_probe(), FLASH_BANK_COMMAND_HANDLER(), jtagspi_probe(), kinetis_fill_fcf(), lpcspifi_probe(), mrvlqspi_probe(), nrf5_write(), psoc5lp_protect_check(), s6e2cc_init_sector(), sh_qspi_probe(), sh_qspi_write(), stm32x_protect_check(), stmqspi_probe(), and stmsmi_probe().

◆ offset

◆ size


The documentation for this struct was generated from the following file: