OpenOCD
flash_bank Struct Reference

Provides details of a flash bank, available either on-chip or through a major interface. More...

Collaboration diagram for flash_bank:

Data Fields

unsigned int bank_number
 The 'bank' (or chip number) of this instance. More...
 
target_addr_t base
 The base address of this bank. More...
 
unsigned int bus_width
 Maximum bus width, in bytes (1,2,4 bytes) More...
 
unsigned int chip_width
 Width of the chip in bytes (1,2,4 bytes) More...
 
uint8_t default_padded_value
 Default padded value used, normally this matches the flash erased value. More...
 
const struct flash_driverdriver
 Driver for this bank. More...
 
void * driver_priv
 Private driver storage pointer. More...
 
uint8_t erased_value
 Erased value. More...
 
uint32_t minimal_write_gap
 Minimal gap between sections to discontinue flash write Default FLASH_WRITE_GAP_SECTOR splits the write if one or more untouched sectors in between. More...
 
char * name
 
struct flash_banknext
 The next flash bank on this chip. More...
 
unsigned int num_prot_blocks
 The number of protection blocks in this bank. More...
 
unsigned int num_sectors
 The number of sectors on this chip. More...
 
struct flash_sectorprot_blocks
 Array of protection blocks, allocated and initialized by the flash driver. More...
 
struct flash_sectorsectors
 Array of sectors, allocated and initialized by the flash driver. More...
 
uint32_t size
 The size of this chip bank, in bytes. More...
 
struct targettarget
 Target to which this bank belongs. More...
 
uint32_t write_end_alignment
 Required alignment of flash write end address. More...
 
uint32_t write_start_alignment
 Required alignment of flash write start address. More...
 

Detailed Description

Provides details of a flash bank, available either on-chip or through a major interface.

This structure will be passed as a parameter to the callbacks in the flash_driver_s structure, some of which may modify the contents of this structure of the area of flash that it defines. Driver writers may use the driver_priv member to store additional data on a per-bank basis, if required.

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

Field Documentation

◆ bank_number

unsigned int flash_bank::bank_number

The 'bank' (or chip number) of this instance.

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

Referenced by at91sam7_read_part_info(), COMMAND_HANDLER(), and FLASH_BANK_COMMAND_HANDLER().

◆ base

◆ bus_width

unsigned int flash_bank::bus_width

Maximum bus width, in bytes (1,2,4 bytes)

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

Referenced by COMMAND_HANDLER(), and virtual_update_bank_info().

◆ chip_width

unsigned int flash_bank::chip_width

Width of the chip in bytes (1,2,4 bytes)

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

Referenced by COMMAND_HANDLER(), and virtual_update_bank_info().

◆ default_padded_value

uint8_t flash_bank::default_padded_value

Default padded value used, normally this matches the flash erased value.

Defaults to 0xFF.

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

Referenced by COMMAND_HANDLER(), flash_write_unlock_verify(), and virtual_update_bank_info().

◆ driver

◆ driver_priv

void* flash_bank::driver_priv

Private driver storage pointer.

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

Referenced by at91sam7_read_part_info(), FLASH_BANK_COMMAND_HANDLER(), kinetis_get_chip(), nrf5_get_chip(), and rsl10_get_chip().

◆ erased_value

uint8_t flash_bank::erased_value

Erased value.

Defaults to 0xFF.

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

Referenced by COMMAND_HANDLER(), and virtual_update_bank_info().

◆ minimal_write_gap

uint32_t flash_bank::minimal_write_gap

Minimal gap between sections to discontinue flash write Default FLASH_WRITE_GAP_SECTOR splits the write if one or more untouched sectors in between.

Can be size in bytes or FLASH_WRITE_CONTINUOUS

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

Referenced by COMMAND_HANDLER(), and virtual_update_bank_info().

◆ name

◆ next

◆ num_prot_blocks

unsigned int flash_bank::num_prot_blocks

The number of protection blocks in this bank.

This value is set initially to 0 and sectors are used as protection blocks. Driver probe can set protection blocks array to work with protection granularity different than sector size.

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

Referenced by COMMAND_HANDLER(), flash_iterate_address_range_inner(), kinetis_fill_fcf(), and virtual_update_bank_info().

◆ num_sectors

unsigned int flash_bank::num_sectors

The number of sectors on this chip.

This value will be set initially to 0, and the flash driver must set this to some non-zero value during "probe()" or "auto_probe()".

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

Referenced by at91sam7_read_part_info(), COMMAND_HANDLER(), FLASH_BANK_COMMAND_HANDLER(), flash_iterate_address_range_inner(), flash_set_dirty(), flash_write_unlock_verify(), gdb_memory_map(), and virtual_update_bank_info().

◆ prot_blocks

struct flash_sector* flash_bank::prot_blocks

Array of protection blocks, allocated and initialized by the flash driver.

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

Referenced by COMMAND_HANDLER(), flash_iterate_address_range_inner(), kinetis_fill_fcf(), and virtual_update_bank_info().

◆ sectors

struct flash_sector* flash_bank::sectors

◆ size

◆ target

◆ write_end_alignment

uint32_t flash_bank::write_end_alignment

Required alignment of flash write end address.

Default 0, no alignment. Can be any power of two or FLASH_WRITE_ALIGN_SECTOR

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

Referenced by flash_write_unlock_verify(), and virtual_update_bank_info().

◆ write_start_alignment

uint32_t flash_bank::write_start_alignment

Required alignment of flash write start address.

Default 0, no alignment. Can be any power of two or FLASH_WRITE_ALIGN_SECTOR

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

Referenced by flash_write_unlock_verify(), and virtual_update_bank_info().


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