OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | psoc5lp_device |
struct | psoc5lp_eeprom_flash_bank |
struct | psoc5lp_flash_bank |
struct | psoc5lp_nvl_flash_bank |
Functions | |
COMMAND_HANDLER (psoc5lp_handle_mass_erase_command) | |
FLASH_BANK_COMMAND_HANDLER (psoc5lp_eeprom_flash_bank_command) | |
FLASH_BANK_COMMAND_HANDLER (psoc5lp_flash_bank_command) | |
FLASH_BANK_COMMAND_HANDLER (psoc5lp_nvl_flash_bank_command) | |
static int | psoc5lp_auto_probe (struct flash_bank *bank) |
static int | psoc5lp_eeprom_auto_probe (struct flash_bank *bank) |
static int | psoc5lp_eeprom_erase (struct flash_bank *bank, unsigned int first, unsigned int last) |
static int | psoc5lp_eeprom_get_info_command (struct flash_bank *bank, struct command_invocation *cmd) |
static int | psoc5lp_eeprom_probe (struct flash_bank *bank) |
static int | psoc5lp_eeprom_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t byte_count) |
static int | psoc5lp_erase (struct flash_bank *bank, unsigned int first, unsigned int last) |
static int | psoc5lp_erase_check (struct flash_bank *bank) |
static int | psoc5lp_find_device (struct target *target, const struct psoc5lp_device **device) |
static int | psoc5lp_get_device_id (struct target *target, uint32_t *id) |
static int | psoc5lp_get_info_command (struct flash_bank *bank, struct command_invocation *cmd) |
static void | psoc5lp_get_part_number (const struct psoc5lp_device *dev, char *str) |
static int | psoc5lp_nvl_auto_probe (struct flash_bank *bank) |
static int | psoc5lp_nvl_erase (struct flash_bank *bank, unsigned int first, unsigned int last) |
static int | psoc5lp_nvl_erase_check (struct flash_bank *bank) |
static int | psoc5lp_nvl_get_info_command (struct flash_bank *bank, struct command_invocation *cmd) |
static int | psoc5lp_nvl_probe (struct flash_bank *bank) |
static int | psoc5lp_nvl_read (struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count) |
static int | psoc5lp_nvl_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t byte_count) |
static int | psoc5lp_probe (struct flash_bank *bank) |
static int | psoc5lp_protect_check (struct flash_bank *bank) |
static int | psoc5lp_spc_busy_wait_data (struct target *target) |
static int | psoc5lp_spc_busy_wait_idle (struct target *target) |
static int | psoc5lp_spc_enable_clock (struct target *target) |
static int | psoc5lp_spc_erase_all (struct target *target) |
static int | psoc5lp_spc_erase_sector (struct target *target, uint8_t array_id, uint8_t row_id) |
static int | psoc5lp_spc_get_temp (struct target *target, uint8_t samples, uint8_t *data) |
static int | psoc5lp_spc_load_byte (struct target *target, uint8_t array_id, uint8_t offset, uint8_t value) |
static int | psoc5lp_spc_load_row (struct target *target, uint8_t array_id, const uint8_t *data, unsigned row_size) |
static int | psoc5lp_spc_read_byte (struct target *target, uint8_t array_id, uint8_t offset, uint8_t *data) |
static int | psoc5lp_spc_read_hidden_row (struct target *target, uint8_t array_id, uint8_t row_id, uint8_t *data) |
static int | psoc5lp_spc_read_volatile_byte (struct target *target, uint8_t array_id, uint8_t offset, uint8_t *data) |
static int | psoc5lp_spc_write_opcode (struct target *target, uint8_t opcode) |
static void | psoc5lp_spc_write_opcode_buffer (struct target *target, uint8_t *buf, uint8_t opcode) |
static int | psoc5lp_spc_write_row (struct target *target, uint8_t array_id, uint16_t row_id, const uint8_t *temp) |
static int | psoc5lp_spc_write_user_nvl (struct target *target, uint8_t array_id) |
static int | psoc5lp_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t byte_count) |
Variables | |
static const struct command_registration | psoc5lp_command_handlers [] |
static const struct psoc5lp_device | psoc5lp_devices [] |
const struct flash_driver | psoc5lp_eeprom_flash |
static const struct command_registration | psoc5lp_exec_command_handlers [] |
const struct flash_driver | psoc5lp_flash |
const struct flash_driver | psoc5lp_nvl_flash |
#define BLOCK_SIZE (ROWS_PER_BLOCK * ROW_SIZE) |
#define EEPROM_BLOCK_SIZE (ROWS_PER_BLOCK * EEPROM_ROW_SIZE) |
#define EEPROM_SECTOR_SIZE (ROWS_PER_SECTOR * EEPROM_ROW_SIZE) |
#define SECTOR_SIZE (ROWS_PER_SECTOR * ROW_SIZE) |
#define SECTORS_PER_BLOCK (BLOCK_SIZE / SECTOR_SIZE) |
COMMAND_HANDLER | ( | psoc5lp_handle_mass_erase_command | ) |
Definition at line 1448 of file psoc5lp.c.
References bank, CALL_COMMAND_HANDLER, CMD, CMD_ARGC, command_print(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, and psoc5lp_spc_erase_all().
FLASH_BANK_COMMAND_HANDLER | ( | psoc5lp_eeprom_flash_bank_command | ) |
Definition at line 981 of file psoc5lp.c.
References bank, psoc5lp_eeprom_flash_bank::device, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, NULL, and psoc5lp_eeprom_flash_bank::probed.
FLASH_BANK_COMMAND_HANDLER | ( | psoc5lp_flash_bank_command | ) |
Definition at line 1469 of file psoc5lp.c.
References bank, psoc5lp_flash_bank::device, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, NULL, and psoc5lp_flash_bank::probed.
FLASH_BANK_COMMAND_HANDLER | ( | psoc5lp_nvl_flash_bank_command | ) |
Definition at line 799 of file psoc5lp.c.
References bank, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, and psoc5lp_nvl_flash_bank::probed.
|
static |
Definition at line 1443 of file psoc5lp.c.
References bank, and psoc5lp_probe().
|
static |
Definition at line 971 of file psoc5lp.c.
References bank, ERROR_OK, psoc5lp_eeprom_flash_bank::probed, and psoc5lp_eeprom_probe().
|
static |
Definition at line 836 of file psoc5lp.c.
References bank, ERROR_OK, psoc5lp_spc_erase_sector(), and SPC_ARRAY_EEPROM.
|
static |
Definition at line 910 of file psoc5lp.c.
References bank, cmd, command_print_sameline(), psoc5lp_eeprom_flash_bank::device, ERROR_OK, PART_NUMBER_LEN, and psoc5lp_get_part_number().
|
static |
Definition at line 922 of file psoc5lp.c.
References bank, psoc5lp_eeprom_flash_bank::device, DIV_ROUND_UP, psoc5lp_device::eeprom_kb, EEPROM_SECTOR_SIZE, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_ERROR, PM_ACT_CFG12, PM_ACT_CFG12_EN_EE, psoc5lp_eeprom_flash_bank::probed, psoc5lp_find_device(), TARGET_HALTED, target_read_u32(), and target_write_u32().
Referenced by psoc5lp_eeprom_auto_probe().
|
static |
Definition at line 851 of file psoc5lp.c.
References bank, buffer, EEPROM_ROW_SIZE, ERROR_FLASH_DST_BREAKS_ALIGNMENT, ERROR_OK, LOG_DEBUG, LOG_ERROR, offset, psoc5lp_spc_get_temp(), psoc5lp_spc_load_row(), psoc5lp_spc_write_row(), and SPC_ARRAY_EEPROM.
|
static |
Definition at line 1024 of file psoc5lp.c.
References bank, psoc5lp_flash_bank::ecc_enabled, ERROR_OK, LOG_DEBUG, LOG_WARNING, psoc5lp_spc_erase_sector(), and SECTORS_PER_BLOCK.
|
static |
Definition at line 1056 of file psoc5lp.c.
References target_memory_check_block::address, armv7m_blank_check_memory(), bank, psoc5lp_flash_bank::ecc_enabled, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_ERROR, target_memory_check_block::result, target_memory_check_block::size, target::state, and TARGET_HALTED.
|
static |
Definition at line 244 of file psoc5lp.c.
References ARRAY_SIZE, device, ERROR_FLASH_OPER_UNSUPPORTED, ERROR_OK, LOG_DEBUG, LOG_ERROR, NULL, psoc5lp_devices, and psoc5lp_get_device_id().
Referenced by psoc5lp_eeprom_probe(), psoc5lp_nvl_probe(), and psoc5lp_probe().
|
static |
Definition at line 233 of file psoc5lp.c.
References ERROR_OK, PANTHER_DEVICE_ID, and target_read_u32().
Referenced by psoc5lp_find_device().
|
static |
Definition at line 1357 of file psoc5lp.c.
References bank, cmd, command_print_sameline(), psoc5lp_flash_bank::device, psoc5lp_flash_bank::ecc_enabled, ERROR_OK, PART_NUMBER_LEN, and psoc5lp_get_part_number().
|
static |
Definition at line 190 of file psoc5lp.c.
References psoc5lp_device::fam, psoc5lp_device::flash_kb, and psoc5lp_device::speed_mhz.
Referenced by psoc5lp_eeprom_get_info_command(), psoc5lp_get_info_command(), and psoc5lp_nvl_get_info_command().
|
static |
Definition at line 789 of file psoc5lp.c.
References bank, ERROR_OK, psoc5lp_nvl_flash_bank::probed, and psoc5lp_nvl_probe().
|
static |
Definition at line 649 of file psoc5lp.c.
References ERROR_FLASH_OPER_UNSUPPORTED, and LOG_WARNING.
|
static |
|
static |
Definition at line 744 of file psoc5lp.c.
References bank, cmd, command_print_sameline(), psoc5lp_nvl_flash_bank::device, ERROR_OK, PART_NUMBER_LEN, and psoc5lp_get_part_number().
|
static |
Definition at line 757 of file psoc5lp.c.
References bank, psoc5lp_nvl_flash_bank::device, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_ERROR, NVL_META_BASE, psoc5lp_nvl_flash_bank::probed, psoc5lp_find_device(), and TARGET_HALTED.
Referenced by psoc5lp_nvl_auto_probe().
|
static |
Definition at line 627 of file psoc5lp.c.
References bank, buffer, count, ERROR_OK, offset, psoc5lp_spc_enable_clock(), psoc5lp_spc_read_byte(), and SPC_ARRAY_NVL_USER.
Referenced by psoc5lp_nvl_write().
|
static |
Definition at line 664 of file psoc5lp.c.
References bank, buffer, ERROR_FAIL, ERROR_FLASH_OPER_UNSUPPORTED, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, LOG_ERROR, LOG_INFO, LOG_WARNING, offset, PRT1_PC2, psoc5lp_nvl_read(), psoc5lp_spc_load_byte(), psoc5lp_spc_read_volatile_byte(), psoc5lp_spc_write_user_nvl(), RESET_INIT, SPC_ARRAY_NVL_USER, target_call_reset_callbacks(), target_read_u8(), and target_write_u8().
|
static |
Definition at line 1371 of file psoc5lp.c.
References bank, psoc5lp_flash_bank::device, DIV_ROUND_UP, psoc5lp_flash_bank::ecc_enabled, ERROR_OK, ERROR_TARGET_NOT_HALTED, psoc5lp_device::flash_kb, LOG_DEBUG, LOG_ERROR, NVL_3_ECCEN, psoc5lp_flash_bank::probed, psoc5lp_find_device(), psoc5lp_spc_enable_clock(), psoc5lp_spc_get_temp(), psoc5lp_spc_read_byte(), ROW_ECC_SIZE, ROWS_PER_SECTOR, SECTOR_SIZE, SPC_ARRAY_NVL_USER, target::state, and TARGET_HALTED.
Referenced by psoc5lp_auto_probe().
|
static |
Definition at line 1306 of file psoc5lp.c.
References bank, BLOCK_SIZE, DIV_ROUND_UP, psoc5lp_flash_bank::ecc_enabled, ERROR_OK, ERROR_TARGET_NOT_HALTED, flash_sector::is_protected, LOG_DEBUG, LOG_ERROR, psoc5lp_spc_read_hidden_row(), ROW_SIZE, ROWS_PER_SECTOR, SECTOR_SIZE, SECTORS_PER_BLOCK, SPC_ROW_PROTECTION, and TARGET_HALTED.
|
static |
Definition at line 312 of file psoc5lp.c.
References alive_sleep(), ERROR_FLASH_OPERATION_FAILED, ERROR_OK, SPC_SR, SPC_SR_DATA_READY, target_read_u8(), and timeval_ms().
Referenced by psoc5lp_spc_get_temp(), psoc5lp_spc_read_byte(), psoc5lp_spc_read_hidden_row(), and psoc5lp_spc_read_volatile_byte().
|
static |
Definition at line 335 of file psoc5lp.c.
References alive_sleep(), ERROR_FLASH_OPERATION_FAILED, ERROR_OK, SPC_SR, SPC_SR_IDLE, target_read_u8(), and timeval_ms().
Referenced by psoc5lp_spc_erase_all(), psoc5lp_spc_erase_sector(), psoc5lp_spc_get_temp(), psoc5lp_spc_load_byte(), psoc5lp_spc_load_row(), psoc5lp_spc_read_byte(), psoc5lp_spc_read_hidden_row(), psoc5lp_spc_read_volatile_byte(), psoc5lp_spc_write_row(), psoc5lp_spc_write_user_nvl(), and psoc5lp_write().
|
static |
Definition at line 269 of file psoc5lp.c.
References ERROR_OK, LOG_ERROR, PM_ACT_CFG0, PM_ACT_CFG0_EN_CLK_SPC, target_read_u8(), and target_write_u8().
Referenced by psoc5lp_nvl_read(), and psoc5lp_probe().
|
static |
Definition at line 511 of file psoc5lp.c.
References ERROR_OK, psoc5lp_spc_busy_wait_idle(), psoc5lp_spc_write_opcode(), and SPC_ERASE_ALL.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 489 of file psoc5lp.c.
References ERROR_OK, psoc5lp_spc_busy_wait_idle(), psoc5lp_spc_write_opcode(), SPC_CPU_DATA, SPC_ERASE_SECTOR, and target_write_u8().
Referenced by psoc5lp_eeprom_erase(), and psoc5lp_erase().
|
static |
Definition at line 558 of file psoc5lp.c.
References ERROR_OK, psoc5lp_spc_busy_wait_data(), psoc5lp_spc_busy_wait_idle(), psoc5lp_spc_write_opcode(), SPC_CPU_DATA, SPC_GET_TEMP, target_read_u8(), and target_write_u8().
Referenced by psoc5lp_eeprom_write(), psoc5lp_probe(), and psoc5lp_write().
|
static |
Definition at line 358 of file psoc5lp.c.
References ERROR_OK, offset, psoc5lp_spc_busy_wait_idle(), psoc5lp_spc_write_opcode(), SPC_CPU_DATA, SPC_LOAD_BYTE, and target_write_u8().
Referenced by psoc5lp_nvl_write().
|
static |
Definition at line 383 of file psoc5lp.c.
References ERROR_OK, psoc5lp_spc_busy_wait_idle(), psoc5lp_spc_write_opcode(), SPC_CPU_DATA, SPC_LOAD_ROW, and target_write_u8().
Referenced by psoc5lp_eeprom_write().
|
static |
Definition at line 409 of file psoc5lp.c.
References ERROR_OK, offset, psoc5lp_spc_busy_wait_data(), psoc5lp_spc_busy_wait_idle(), psoc5lp_spc_write_opcode(), SPC_CPU_DATA, SPC_READ_BYTE, target_read_u8(), and target_write_u8().
Referenced by psoc5lp_nvl_read(), and psoc5lp_probe().
|
static |
Definition at line 526 of file psoc5lp.c.
References ERROR_OK, psoc5lp_spc_busy_wait_data(), psoc5lp_spc_busy_wait_idle(), psoc5lp_spc_write_opcode(), ROW_SIZE, SPC_CPU_DATA, SPC_READ_HIDDEN_ROW, target_read_u8(), and target_write_u8().
Referenced by psoc5lp_protect_check().
|
static |
Definition at line 588 of file psoc5lp.c.
References ERROR_OK, offset, psoc5lp_spc_busy_wait_data(), psoc5lp_spc_busy_wait_idle(), psoc5lp_spc_write_opcode(), SPC_CPU_DATA, SPC_READ_VOLATILE_BYTE, target_read_u8(), and target_write_u8().
Referenced by psoc5lp_nvl_write().
|
static |
Definition at line 290 of file psoc5lp.c.
References ERROR_OK, SPC_CPU_DATA, SPC_KEY1, SPC_KEY2, and target_write_u8().
Referenced by psoc5lp_spc_erase_all(), psoc5lp_spc_erase_sector(), psoc5lp_spc_get_temp(), psoc5lp_spc_load_byte(), psoc5lp_spc_load_row(), psoc5lp_spc_read_byte(), psoc5lp_spc_read_hidden_row(), psoc5lp_spc_read_volatile_byte(), psoc5lp_spc_write_row(), and psoc5lp_spc_write_user_nvl().
|
static |
Definition at line 304 of file psoc5lp.c.
References SPC_KEY1, and SPC_KEY2.
Referenced by psoc5lp_write().
|
static |
Definition at line 439 of file psoc5lp.c.
References ERROR_OK, psoc5lp_spc_busy_wait_idle(), psoc5lp_spc_write_opcode(), SPC_CPU_DATA, SPC_WRITE_ROW, and target_write_u8().
Referenced by psoc5lp_eeprom_write().
|
static |
Definition at line 470 of file psoc5lp.c.
References ERROR_OK, psoc5lp_spc_busy_wait_idle(), psoc5lp_spc_write_opcode(), SPC_CPU_DATA, SPC_WRITE_USER_NVL, and target_write_u8().
Referenced by psoc5lp_nvl_write().
|
static |
Definition at line 1119 of file psoc5lp.c.
References working_area::address, bank, BLOCK_SIZE, buffer, psoc5lp_flash_bank::ecc_enabled, ERROR_FLASH_DST_BREAKS_ALIGNMENT, ERROR_FLASH_DST_OUT_OF_BANK, ERROR_OK, LOG_DEBUG, LOG_ERROR, MIN, offset, PHUB_CFGMEM0_CFG0, PHUB_CFGMEM0_CFG1, PHUB_CFGMEM1_CFG0, PHUB_CFGMEM1_CFG1, PHUB_CFGMEMX_CFG0, PHUB_CH0_ACTION, PHUB_CH0_BASIC_CFG, PHUB_CH0_BASIC_STATUS, PHUB_CH1_ACTION, PHUB_CH1_BASIC_CFG, PHUB_CH1_BASIC_STATUS, PHUB_CHX_ACTION_CPU_REQ, PHUB_CHX_BASIC_CFG_EN, PHUB_CHX_BASIC_CFG_WORK_SEP, PHUB_TDMEM0_ORIG_TD0, PHUB_TDMEM0_ORIG_TD1, PHUB_TDMEM1_ORIG_TD0, PHUB_TDMEM1_ORIG_TD1, PHUB_TDMEMX_ORIG_TD0_INC_SRC_ADDR, PHUB_TDMEMX_ORIG_TD0_NEXT_TD_PTR_LAST, psoc5lp_spc_busy_wait_idle(), psoc5lp_spc_get_temp(), psoc5lp_spc_write_opcode_buffer(), ROW_ECC_SIZE, ROW_SIZE, ROWS_PER_BLOCK, working_area::size, SPC_CPU_DATA, SPC_LOAD_ROW, SPC_OPCODE_LEN, SPC_PRG_ROW, TARGET_ADDR_FMT, target_alloc_working_area(), target_free_working_area(), target_get_working_area_avail(), target_write_buffer(), target_write_u32(), and target::working_area_size.
|
static |
|
static |
Definition at line 1 of file psoc5lp.c.
Referenced by psoc5lp_find_device().
const struct flash_driver psoc5lp_eeprom_flash |
|
static |
const struct flash_driver psoc5lp_flash |
const struct flash_driver psoc5lp_nvl_flash |