OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | msp432_bank |
Macros | |
#define | E4_DID0_REG 0x400FE000 |
#define | E4_DID1_REG 0x400FE004 |
#define | FLASH_TIMEOUT 8000 |
#define | P4_DEVICE_ID_REG 0x0020100C |
#define | P4_FLASH_INFO_SIZE_REG 0xE0043024 |
#define | P4_FLASH_MAIN_SIZE_REG 0xE0043020 |
#define | P4_HARDWARE_REV_REG 0x00201010 |
#define | SUPPORT_MESSAGE |
Functions | |
COMMAND_HANDLER (msp432_bsl_command) | |
COMMAND_HANDLER (msp432_mass_erase_command) | |
FLASH_BANK_COMMAND_HANDLER (msp432_flash_bank_command) | |
static int | msp432_auto_probe (struct flash_bank *bank) |
static int | msp432_device_type (uint32_t family_type, uint32_t device_id, uint32_t hardware_rev) |
static int | msp432_erase (struct flash_bank *bank, unsigned int first, unsigned int last) |
static int | msp432_exec_cmd (struct target *target, struct msp432_algo_params *algo_params, uint32_t command) |
static void | msp432_flash_free_driver_priv (struct flash_bank *bank) |
static int | msp432_info (struct flash_bank *bank, struct command_invocation *cmd) |
static int | msp432_init (struct flash_bank *bank) |
static void | msp432_init_params (struct msp432_algo_params *algo_params) |
static int | msp432_mass_erase (struct flash_bank *bank, bool all) |
static int | msp432_probe (struct flash_bank *bank) |
static int | msp432_protect_check (struct flash_bank *bank) |
static int | msp432_quit (struct flash_bank *bank) |
static const char * | msp432_return_text (uint32_t return_code) |
static int | msp432_wait_inactive (struct target *target, uint32_t buffer) |
static int | msp432_wait_return_code (struct target *target) |
static int | msp432_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
Variables | |
static const struct command_registration | msp432_command_handlers [] |
static const struct command_registration | msp432_exec_command_handlers [] |
const struct flash_driver | msp432_flash |
static const uint8_t | msp432e4x_algo [] |
static const uint8_t | msp432p401x_algo [] |
static const uint8_t | msp432p411x_algo [] |
#define SUPPORT_MESSAGE |
COMMAND_HANDLER | ( | msp432_bsl_command | ) |
Definition at line 529 of file msp432.c.
References bank, CALL_COMMAND_HANDLER, CMD_ARGC, CMD_ARGV, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, msp432_bank::family_type, LOG_INFO, LOG_WARNING, MSP432E4, and msp432_bank::unlock_bsl.
COMMAND_HANDLER | ( | msp432_mass_erase_command | ) |
Definition at line 478 of file msp432.c.
References bank, CALL_COMMAND_HANDLER, CMD_ARGC, CMD_ARGV, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, msp432_bank::family_type, LOG_INFO, msp432_mass_erase(), and MSP432E4.
FLASH_BANK_COMMAND_HANDLER | ( | msp432_flash_bank_command | ) |
Definition at line 568 of file msp432.c.
References bank, CMD_ARGC, msp432_bank::device_id, msp432_bank::device_type, ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, ERROR_OK, msp432_bank::family_type, FLASH_BASE, msp432_bank::hardware_rev, MSP432_NO_FAMILY, MSP432_NO_TYPE, NULL, msp432_bank::probed_info, msp432_bank::probed_main, msp432_bank::sector_length, msp432_bank::unlock_bsl, and msp432_bank::working_area.
|
static |
Definition at line 964 of file msp432.c.
References bank, ERROR_OK, FLASH_BASE, msp432_probe(), P4_FLASH_INFO_BASE, msp432_bank::probed_info, and msp432_bank::probed_main.
Referenced by msp432_init().
|
static |
Definition at line 65 of file msp432.c.
References MSP432_NO_TYPE, MSP432E4, MSP432E401Y, MSP432E411Y, MSP432E4X_GUESS, MSP432P401X, MSP432P401X_DEPR, MSP432P401X_GUESS, MSP432P411X, and MSP432P411X_GUESS.
Referenced by msp432_probe().
|
static |
Definition at line 598 of file msp432.c.
References msp432_algo_params::address, bank, buf_set_u32(), msp432_algo_params::erase_param, ERROR_OK, ERROR_TARGET_NOT_HALTED, FLASH_BASE, FLASH_ERASE_INFO, FLASH_SECTOR_ERASE, FLASH_UNLOCK_BSL, LOG_ERROR, msp432_exec_cmd(), msp432_init(), msp432_init_params(), msp432_mass_erase(), msp432_quit(), msp432_wait_return_code(), P4_FLASH_INFO_BASE, msp432_bank::sector_length, target::state, TARGET_HALTED, msp432_bank::unlock_bsl, and msp432_algo_params::unlock_bsl.
|
static |
Definition at line 184 of file msp432.c.
References ALGO_FLASH_COMMAND_ADDR, ALGO_PARAMS_BASE_ADDR, buf_set_u32(), msp432_algo_params::buffer1_status, msp432_algo_params::buffer2_status, BUFFER_INACTIVE, ERROR_OK, msp432_algo_params::flash_command, FLASH_NO_COMMAND, msp432_algo_params::return_code, target_write_buffer(), and target_write_u32().
Referenced by msp432_erase(), msp432_init(), msp432_mass_erase(), msp432_quit(), and msp432_write().
|
static |
|
static |
Definition at line 983 of file msp432.c.
References bank, cmd, command_print_sameline(), msp432_bank::device_id, msp432_bank::device_type, ERROR_OK, msp432_bank::hardware_rev, MSP432E401Y, MSP432E411Y, MSP432E4X_GUESS, MSP432P401X, MSP432P401X_DEPR, MSP432P401X_GUESS, MSP432P411X, MSP432P411X_GUESS, and SUPPORT_MESSAGE.
|
static |
Definition at line 279 of file msp432.c.
References working_area::address, ALGO_BASE_ADDR, ALGO_PARAMS_BASE_ADDR, ALGO_STACK_POINTER_ADDR, ALGO_WORKING_SIZE, ARM_MODE_THREAD, ARMV7M_COMMON_MAGIC, msp432_bank::armv7m_info, bank, buf_set_u32(), armv7m_algorithm::common_magic, armv7m_algorithm::core_mode, destroy_reg_param(), msp432_bank::device_id, msp432_bank::device_type, E4_ALGO_ENTRY_ADDR, ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, FLASH_INIT, msp432_bank::hardware_rev, init_reg_param(), LOG_ERROR, LOG_WARNING, msp432_auto_probe(), msp432_exec_cmd(), msp432_init_params(), msp432_wait_return_code(), MSP432E401Y, MSP432E411Y, msp432e4x_algo, MSP432E4X_GUESS, MSP432P401X, msp432p401x_algo, MSP432P401X_DEPR, MSP432P401X_GUESS, MSP432P411X, msp432p411x_algo, MSP432P411X_GUESS, NULL, P4_ALGO_ENTRY_ADDR, PARAM_OUT, SUPPORT_MESSAGE, target_alloc_working_area(), target_free_working_area(), target_start_algorithm(), target_write_buffer(), reg_param::value, and msp432_bank::working_area.
Referenced by msp432_erase(), msp432_mass_erase(), and msp432_write().
|
static |
Definition at line 171 of file msp432.c.
References msp432_algo_params::_reserved0, msp432_algo_params::address, buf_set_u32(), msp432_algo_params::buffer1_status, msp432_algo_params::buffer2_status, BUFFER_INACTIVE, msp432_algo_params::erase_param, msp432_algo_params::flash_command, FLASH_ERASE_MAIN, FLASH_LOCK_BSL, FLASH_NO_COMMAND, msp432_algo_params::length, msp432_algo_params::return_code, and msp432_algo_params::unlock_bsl.
Referenced by msp432_erase(), msp432_init(), msp432_mass_erase(), msp432_quit(), and msp432_write().
|
static |
Definition at line 432 of file msp432.c.
References bank, buf_set_u32(), msp432_algo_params::erase_param, ERROR_OK, ERROR_TARGET_NOT_HALTED, FLASH_ERASE_INFO, FLASH_ERASE_MAIN, FLASH_MASS_ERASE, FLASH_UNLOCK_BSL, LOG_ERROR, msp432_exec_cmd(), msp432_init(), msp432_init_params(), msp432_quit(), msp432_wait_return_code(), target::state, TARGET_HALTED, msp432_bank::unlock_bsl, and msp432_algo_params::unlock_bsl.
Referenced by COMMAND_HANDLER(), and msp432_erase().
|
static |
Definition at line 808 of file msp432.c.
References bank, msp432_bank::device_id, msp432_bank::device_type, E4_DID0_REG, E4_DID1_REG, E4_FLASH_SIZE, E4_SECTOR_LENGTH, ERROR_FAIL, ERROR_OK, msp432_bank::family_type, flash_bank_add(), FLASH_BASE, msp432_bank::hardware_rev, info, msp432_device_type(), MSP432E4, MSP432P4, MSP432P411X, MSP432P411X_GUESS, name, NULL, P4_DEVICE_ID_REG, P4_FLASH_INFO_BASE, P4_FLASH_INFO_SIZE_REG, P4_FLASH_MAIN_SIZE_REG, P4_HARDWARE_REV_REG, P4_SECTOR_LENGTH, msp432_bank::probed_info, msp432_bank::probed_main, msp432_bank::sector_length, size, and target_read_u32().
Referenced by msp432_auto_probe().
|
static |
|
static |
Definition at line 401 of file msp432.c.
References msp432_bank::armv7m_info, bank, ERROR_OK, FLASH_EXIT, FLASH_TIMEOUT, msp432_exec_cmd(), msp432_init_params(), msp432_wait_return_code(), NULL, target_free_working_area(), target_halt(), target_wait_algorithm(), and msp432_bank::working_area.
Referenced by msp432_erase(), msp432_mass_erase(), and msp432_write().
|
static |
Definition at line 149 of file msp432.c.
References FLASH_BUSY, FLASH_ERROR, FLASH_POWER_ERROR, FLASH_SUCCESS, FLASH_TIMEOUT_ERROR, FLASH_VERIFY_ERROR, and FLASH_WRONG_COMMAND.
Referenced by msp432_wait_return_code().
|
static |
Definition at line 237 of file msp432.c.
References ALGO_BUFFER1_STATUS_ADDR, ALGO_BUFFER2_STATUS_ADDR, buffer, BUFFER_ACTIVE, BUFFER_INACTIVE, ERROR_FAIL, ERROR_OK, FLASH_TIMEOUT, keep_alive(), LOG_ERROR, target_read_u32(), and timeval_ms().
Referenced by msp432_write().
|
static |
Definition at line 207 of file msp432.c.
References ALGO_RETURN_CODE_ADDR, ERROR_FAIL, ERROR_OK, FLASH_BUSY, FLASH_SUCCESS, FLASH_TIMEOUT, keep_alive(), LOG_ERROR, msp432_return_text(), target_read_u32(), and timeval_ms().
Referenced by msp432_erase(), msp432_init(), msp432_mass_erase(), msp432_quit(), and msp432_write().
|
static |
Definition at line 673 of file msp432.c.
References msp432_algo_params::address, ALGO_BUFFER1_ADDR, ALGO_BUFFER1_STATUS_ADDR, ALGO_BUFFER_SIZE, bank, buf_set_u32(), buffer, BUFFER_DATA_READY, count, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, ERROR_TARGET_NOT_HALTED, FLASH_CONTINUOUS, FLASH_UNLOCK_BSL, keep_alive(), msp432_algo_params::length, LOG_ERROR, MIN, msp432_exec_cmd(), msp432_init(), msp432_init_params(), msp432_quit(), msp432_wait_inactive(), msp432_wait_return_code(), offset, P4_FLASH_INFO_BASE, size, start, target::state, TARGET_HALTED, target_write_buffer(), target_write_u32(), timeval_ms(), msp432_bank::unlock_bsl, and msp432_algo_params::unlock_bsl.
|
static |
|
static |
const struct flash_driver msp432_flash |
|
static |
|
static |
|
static |