OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | mdr_flash_bank |
Macros | |
#define | FLASH_ADR (FLASH_REG_BASE + 0x04) |
#define | FLASH_CMD (FLASH_REG_BASE + 0x00) |
#define | FLASH_CON (1 << 0) |
#define | FLASH_DELAY_MASK (7 << 3) |
#define | FLASH_DI (FLASH_REG_BASE + 0x08) |
#define | FLASH_DO (FLASH_REG_BASE + 0x0C) |
#define | FLASH_ERASE (1 << 10) |
#define | FLASH_IFREN (1 << 9) |
#define | FLASH_KEY (FLASH_REG_BASE + 0x10) |
#define | FLASH_MAS1 (1 << 11) |
#define | FLASH_NVSTR (1 << 13) |
#define | FLASH_PROG (1 << 12) |
#define | FLASH_RD (1 << 2) |
#define | FLASH_REG_BASE 0x40018000 |
#define | FLASH_SE (1 << 8) |
#define | FLASH_WR (1 << 1) |
#define | FLASH_XE (1 << 6) |
#define | FLASH_YE (1 << 7) |
#define | KEY 0x8AAA5551 |
#define | MD_PER_CLOCK (MD_RST_CLK + 0x1C) |
#define | MD_PER_CLOCK_EEPROM (1 << 3) |
#define | MD_PER_CLOCK_RST_CLK (1 << 4) |
#define | MD_RST_CLK 0x40020000 |
Functions | |
FLASH_BANK_COMMAND_HANDLER (mdr_flash_bank_command) | |
static int | get_mdr_info (struct flash_bank *bank, struct command_invocation *cmd) |
static int | mdr_auto_probe (struct flash_bank *bank) |
static int | mdr_erase (struct flash_bank *bank, unsigned int first, unsigned int last) |
static int | mdr_mass_erase (struct flash_bank *bank) |
static int | mdr_probe (struct flash_bank *bank) |
static int | mdr_read (struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count) |
static int | mdr_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
static int | mdr_write_block (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
Variables | |
const struct flash_driver | mdr_flash |
#define FLASH_ADR (FLASH_REG_BASE + 0x04) |
#define FLASH_CMD (FLASH_REG_BASE + 0x00) |
#define FLASH_DI (FLASH_REG_BASE + 0x08) |
#define FLASH_DO (FLASH_REG_BASE + 0x0C) |
#define FLASH_KEY (FLASH_REG_BASE + 0x10) |
#define MD_PER_CLOCK (MD_RST_CLK + 0x1C) |
FLASH_BANK_COMMAND_HANDLER | ( | mdr_flash_bank_command | ) |
Definition at line 61 of file mdr.c.
References bank, CMD_ARGC, CMD_ARGV, COMMAND_PARSE_NUMBER, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, mdr_flash_bank::mem_type, mdr_flash_bank::page_count, mdr_flash_bank::probed, and mdr_flash_bank::sec_count.
|
static |
Definition at line 588 of file mdr.c.
References bank, cmd, command_print_sameline(), ERROR_OK, and mdr_flash_bank::mem_type.
|
static |
Definition at line 580 of file mdr.c.
References bank, ERROR_OK, mdr_probe(), and mdr_flash_bank::probed.
|
static |
Definition at line 116 of file mdr.c.
References bank, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, ERROR_TARGET_NOT_HALTED, FLASH_ADR, FLASH_CMD, FLASH_CON, FLASH_DELAY_MASK, FLASH_ERASE, FLASH_IFREN, FLASH_KEY, FLASH_NVSTR, FLASH_XE, KEY, LOG_ERROR, MD_PER_CLOCK, MD_PER_CLOCK_EEPROM, mdr_mass_erase(), mdr_flash_bank::mem_type, mdr_flash_bank::page_count, mdr_flash_bank::sec_count, TARGET_HALTED, target_read_u32(), and target_write_u32().
|
static |
Definition at line 78 of file mdr.c.
References bank, ERROR_OK, FLASH_ADR, FLASH_CMD, FLASH_ERASE, FLASH_MAS1, FLASH_NVSTR, FLASH_XE, mdr_flash_bank::sec_count, target_read_u32(), and target_write_u32().
Referenced by mdr_erase().
|
static |
Definition at line 555 of file mdr.c.
References bank, ERROR_OK, mdr_flash_bank::page_count, and mdr_flash_bank::probed.
Referenced by mdr_auto_probe().
|
static |
Definition at line 461 of file mdr.c.
References bank, buf_set_u32(), buffer, count, default_flash_read(), ERROR_FLASH_DST_BREAKS_ALIGNMENT, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, ERROR_TARGET_NOT_HALTED, FLASH_ADR, FLASH_CMD, FLASH_CON, FLASH_DELAY_MASK, FLASH_DO, FLASH_IFREN, FLASH_KEY, FLASH_SE, FLASH_XE, FLASH_YE, KEY, LOG_ERROR, MD_PER_CLOCK, MD_PER_CLOCK_EEPROM, MD_PER_CLOCK_RST_CLK, mdr_flash_bank::mem_type, offset, TARGET_HALTED, target_read_u32(), and target_write_u32().
|
static |
Definition at line 295 of file mdr.c.
References bank, buffer, count, ERROR_FAIL, ERROR_FLASH_DST_BREAKS_ALIGNMENT, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, ERROR_TARGET_NOT_HALTED, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, FLASH_ADR, FLASH_CMD, FLASH_CON, FLASH_DELAY_MASK, FLASH_DI, FLASH_IFREN, FLASH_KEY, FLASH_NVSTR, FLASH_PROG, FLASH_XE, FLASH_YE, KEY, LOG_ERROR, LOG_INFO, LOG_WARNING, MD_PER_CLOCK, MD_PER_CLOCK_EEPROM, MD_PER_CLOCK_RST_CLK, mdr_write_block(), mdr_flash_bank::mem_type, NULL, offset, mdr_flash_bank::page_count, mdr_flash_bank::sec_count, target_checksum_memory(), TARGET_HALTED, target_read_u32(), and target_write_u32().
|
static |
Definition at line 204 of file mdr.c.
References working_area::address, ARM_MODE_THREAD, ARMV7M_COMMON_MAGIC, bank, buf_get_u32(), buf_set_u32(), buffer, armv7m_algorithm::common_magic, armv7m_algorithm::core_mode, count, destroy_reg_param(), ERROR_FLASH_OPERATION_FAILED, ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, FLASH_REG_BASE, init_reg_param(), LOG_ERROR, LOG_WARNING, NULL, offset, PARAM_IN_OUT, PARAM_OUT, source, target_alloc_working_area(), target_alloc_working_area_try(), target_free_working_area(), target_run_flash_async_algorithm(), and target_write_buffer().
Referenced by mdr_write().
const struct flash_driver mdr_flash |