OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | xmc1xxx_flash_bank |
Macros | |
#define | FLASH_BASE 0x10000000 |
#define | FLASH_CS0 (FLASH_BASE + 0xf00) |
#define | NVM_BASE 0x40050000 |
#define | NVM_BLOCK_SIZE (4 * NVM_WORD_SIZE) |
#define | NVM_PAGE_SIZE (16 * NVM_BLOCK_SIZE) |
#define | NVM_WORD_SIZE 4 |
#define | NVMCONF (NVM_BASE + 0x08) |
#define | NVMPROG (NVM_BASE + 0x04) |
#define | NVMPROG_ACTION_IDLE 0x00 |
#define | NVMPROG_ACTION_MASK 0xff |
#define | NVMPROG_ACTION_ONE_SHOT_CONTINUOUS (2 << 4) |
#define | NVMPROG_ACTION_ONE_SHOT_ONCE (1 << 4) |
#define | NVMPROG_ACTION_OPTYPE_IDLE_VERIFY (0 << 0) |
#define | NVMPROG_ACTION_OPTYPE_PAGE_ERASE (2 << 0) |
#define | NVMPROG_ACTION_OPTYPE_WRITE (1 << 0) |
#define | NVMPROG_ACTION_VERIFY_ARRAY (3 << 6) |
#define | NVMPROG_ACTION_VERIFY_EACH (1 << 6) |
#define | NVMPROG_ACTION_VERIFY_NO (2 << 6) |
#define | NVMSTATUS (NVM_BASE + 0x00) |
#define | NVMSTATUS_BUSY (1 << 0) |
#define | NVMSTATUS_VERR_MASK (0x3 << 2) |
#define | PAU_BASE 0x40000000 |
#define | PAU_FLSIZE (PAU_BASE + 0x404) |
#define | SCU_BASE 0x40010000 |
#define | SCU_IDCHIP (SCU_BASE + 0x004) |
Functions | |
FLASH_BANK_COMMAND_HANDLER (xmc1xxx_flash_bank_command) | |
static int | xmc1xxx_auto_probe (struct flash_bank *bank) |
static int | xmc1xxx_erase (struct flash_bank *bank, unsigned int first, unsigned int last) |
static int | xmc1xxx_erase_check (struct flash_bank *bank) |
static int | xmc1xxx_get_info_command (struct flash_bank *bank, struct command_invocation *cmd) |
static int | xmc1xxx_nvm_check_idle (struct target *target) |
static int | xmc1xxx_nvm_set_idle (struct target *target) |
static int | xmc1xxx_probe (struct flash_bank *bank) |
static int | xmc1xxx_protect_check (struct flash_bank *bank) |
static int | xmc1xxx_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t byte_count) |
Variables | |
const struct flash_driver | xmc1xxx_flash |
#define FLASH_CS0 (FLASH_BASE + 0xf00) |
#define NVM_BLOCK_SIZE (4 * NVM_WORD_SIZE) |
#define NVM_PAGE_SIZE (16 * NVM_BLOCK_SIZE) |
FLASH_BANK_COMMAND_HANDLER | ( | xmc1xxx_flash_bank_command | ) |
Definition at line 508 of file xmc1xxx.c.
References bank, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, and xmc1xxx_flash_bank::probed.
|
static |
Definition at line 498 of file xmc1xxx.c.
References bank, ERROR_OK, xmc1xxx_flash_bank::probed, and xmc1xxx_probe().
|
static |
Definition at line 80 of file xmc1xxx.c.
References working_area::address, ARM_MODE_THREAD, ARMV7M_COMMON_MAGIC, ARRAY_SIZE, bank, buf_set_u32(), armv7m_algorithm::common_magic, armv7m_algorithm::core_mode, destroy_reg_param(), ERROR_FLASH_OPERATION_FAILED, ERROR_OK, ERROR_TARGET_NOT_HALTED, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, init_reg_param(), LOG_DEBUG, LOG_ERROR, LOG_WARNING, NULL, NVM_BASE, PARAM_OUT, target_alloc_working_area(), target_free_working_area(), TARGET_HALTED, target_run_algorithm(), target_write_buffer(), xmc1xxx_nvm_check_idle(), and xmc1xxx_nvm_set_idle().
|
static |
Definition at line 155 of file xmc1xxx.c.
References working_area::address, ARM_MODE_THREAD, ARMV7M_COMMON_MAGIC, ARRAY_SIZE, bank, buf_set_u32(), armv7m_algorithm::common_magic, armv7m_algorithm::core_mode, destroy_reg_param(), ERROR_FLASH_OPERATION_FAILED, ERROR_OK, ERROR_TARGET_NOT_HALTED, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, init_reg_param(), LOG_DEBUG, LOG_ERROR, LOG_WARNING, NULL, NVM_BASE, NVMSTATUS, NVMSTATUS_VERR_MASK, PARAM_OUT, start, target_alloc_working_area(), target_free_working_area(), TARGET_HALTED, target_read_u16(), target_run_algorithm(), target_write_buffer(), xmc1xxx_nvm_check_idle(), and xmc1xxx_nvm_set_idle().
|
static |
Definition at line 404 of file xmc1xxx.c.
References bank, cmd, command_print_sameline(), ERROR_OK, ERROR_TARGET_NOT_HALTED, FLASH_CS0, LOG_DEBUG, LOG_ERROR, LOG_WARNING, SCU_BASE, TARGET_HALTED, and target_read_u32().
|
static |
Definition at line 64 of file xmc1xxx.c.
References ERROR_OK, LOG_WARNING, NVMPROG, NVMPROG_ACTION_IDLE, NVMPROG_ACTION_MASK, target_read_u16(), and xmc1xxx_nvm_set_idle().
Referenced by xmc1xxx_erase(), xmc1xxx_erase_check(), and xmc1xxx_write().
|
static |
Definition at line 59 of file xmc1xxx.c.
References NVMPROG, NVMPROG_ACTION_IDLE, and target_write_u16().
Referenced by xmc1xxx_erase(), xmc1xxx_erase_check(), xmc1xxx_nvm_check_idle(), and xmc1xxx_write().
|
static |
Definition at line 441 of file xmc1xxx.c.
References bank, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_DEBUG, LOG_ERROR, LOG_WARNING, PAU_FLSIZE, xmc1xxx_flash_bank::probed, SCU_IDCHIP, TARGET_HALTED, and target_read_u32().
Referenced by xmc1xxx_auto_probe().
|
static |
Definition at line 378 of file xmc1xxx.c.
References bank, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_DEBUG, LOG_ERROR, LOG_WARNING, NVMCONF, TARGET_HALTED, and target_read_u32().
|
static |
Definition at line 240 of file xmc1xxx.c.
References addr, working_area::address, ARM_MODE_THREAD, ARMV7M_COMMON_MAGIC, ARRAY_SIZE, bank, buf_set_u32(), buffer, armv7m_algorithm::common_magic, armv7m_algorithm::core_mode, destroy_reg_param(), DIV_ROUND_UP, ERROR_FLASH_DST_BREAKS_ALIGNMENT, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, ERROR_TARGET_NOT_HALTED, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, init_reg_param(), IS_ALIGNED, LOG_DEBUG, LOG_ERROR, LOG_WARNING, MAX, MIN, NULL, NVM_BASE, NVM_BLOCK_SIZE, offset, PARAM_OUT, working_area::size, target::state, TARGET_ADDR_FMT, target_alloc_working_area(), target_free_working_area(), target_get_working_area_avail(), TARGET_HALTED, target_run_algorithm(), target_write_buffer(), target_write_memory(), write_code, xmc1xxx_nvm_check_idle(), and xmc1xxx_nvm_set_idle().
const struct flash_driver xmc1xxx_flash |