OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | fm4_flash_bank |
Macros | |
#define | DFCTRLR (FLASH_BASE + 0x030) |
#define | DFCTRLR_DFE (1UL << 0) |
#define | FASZR (FLASH_BASE + 0x000) |
#define | FLASH_BASE 0x40000000 |
#define | WDG_BASE 0x40011000 |
#define | WDG_CTL (WDG_BASE + 0x008) |
#define | WDG_LCK (WDG_BASE + 0xC00) |
Enumerations | |
enum | fm4_variant { MB9BFX64 , MB9BFX65 , MB9BFX66 , MB9BFX67 , MB9BFX68 , S6E2CX8 , S6E2CX9 , S6E2CXA , S6E2DX } |
Functions | |
FLASH_BANK_COMMAND_HANDLER (fm4_flash_bank_command) | |
static int | fm4_auto_probe (struct flash_bank *bank) |
static int | fm4_disable_hw_watchdog (struct target *target) |
static int | fm4_enter_flash_cpu_programming_mode (struct target *target) |
static int | fm4_enter_flash_cpu_rom_mode (struct target *target) |
static int | fm4_flash_erase (struct flash_bank *bank, unsigned int first, unsigned int last) |
static int | fm4_flash_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t byte_count) |
static int | fm4_get_info_command (struct flash_bank *bank, struct command_invocation *cmd) |
static bool | fm4_name_match (const char *s, const char *pattern) |
static int | fm4_probe (struct flash_bank *bank) |
static int | mb9bf_bank_setup (struct flash_bank *bank, const char *variant) |
static int | mb9bf_probe (struct flash_bank *bank) |
static int | s6e2cc_bank_setup (struct flash_bank *bank, const char *variant) |
static void | s6e2cc_init_sector (struct flash_sector *sector, int sa) |
static int | s6e2cc_probe (struct flash_bank *bank) |
static int | s6e2dh_probe (struct flash_bank *bank) |
Variables | |
const struct flash_driver | fm4_flash |
#define DFCTRLR (FLASH_BASE + 0x030) |
#define FASZR (FLASH_BASE + 0x000) |
enum fm4_variant |
|
static |
Definition at line 532 of file fm4.c.
References bank, ERROR_OK, fm4_probe(), and fm4_flash_bank::probed.
|
static |
Definition at line 52 of file fm4.c.
References ERROR_OK, target_write_u32(), WDG_CTL, and WDG_LCK.
Referenced by fm4_flash_erase(), and fm4_flash_write().
|
static |
Definition at line 71 of file fm4.c.
References ERROR_OK, FASZR, target_read_u32(), and target_write_u32().
Referenced by fm4_flash_erase(), and fm4_flash_write().
|
static |
Definition at line 87 of file fm4.c.
References ERROR_OK, FASZR, target_read_u32(), and target_write_u32().
Referenced by fm4_flash_erase(), and fm4_flash_write().
|
static |
Definition at line 103 of file fm4.c.
References addr, working_area::address, ARM_MODE_THREAD, ARMV7M_COMMON_MAGIC, ARRAY_SIZE, bank, buf_get_u32(), 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, fm4_disable_hw_watchdog(), fm4_enter_flash_cpu_programming_mode(), fm4_enter_flash_cpu_rom_mode(), init_reg_param(), LOG_DEBUG, LOG_ERROR, LOG_WARNING, NULL, PARAM_IN, PARAM_OUT, target::state, target_alloc_working_area(), target_free_working_area(), TARGET_HALTED, target_run_algorithm(), and target_write_buffer().
|
static |
Definition at line 201 of file fm4.c.
References addr, working_area::address, ARM_MODE_THREAD, ARMV7M_COMMON_MAGIC, ARRAY_SIZE, bank, buf_get_u32(), 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, fm4_disable_hw_watchdog(), fm4_enter_flash_cpu_programming_mode(), fm4_enter_flash_cpu_rom_mode(), init_reg_param(), LOG_DEBUG, LOG_ERROR, LOG_WARNING, MIN, NULL, offset, PARAM_IN, 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(), and target_write_buffer().
|
static |
Definition at line 542 of file fm4.c.
References bank, cmd, command_print_sameline(), ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_WARNING, fm4_flash_bank::macro_nr, MB9BFX64, MB9BFX65, MB9BFX66, MB9BFX67, MB9BFX68, name, S6E2CX8, S6E2CX9, S6E2CXA, S6E2DX, TARGET_HALTED, and fm4_flash_bank::variant.
|
static |
Definition at line 599 of file fm4.c.
Referenced by mb9bf_bank_setup(), and s6e2cc_bank_setup().
|
static |
Definition at line 492 of file fm4.c.
References bank, ERROR_FLASH_OPER_UNSUPPORTED, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_WARNING, mb9bf_probe(), MB9BFX64, MB9BFX65, MB9BFX66, MB9BFX67, MB9BFX68, fm4_flash_bank::probed, s6e2cc_probe(), S6E2CX8, S6E2CX9, S6E2CXA, s6e2dh_probe(), S6E2DX, TARGET_HALTED, and fm4_flash_bank::variant.
Referenced by fm4_auto_probe().
|
static |
Definition at line 615 of file fm4.c.
References bank, ERROR_FLASH_OPER_UNSUPPORTED, ERROR_OK, fm4_name_match(), LOG_WARNING, MB9BFX64, MB9BFX65, MB9BFX66, MB9BFX67, MB9BFX68, and fm4_flash_bank::variant.
|
static |
Definition at line 347 of file fm4.c.
References bank, ERROR_FLASH_OPER_UNSUPPORTED, ERROR_OK, LOG_DEBUG, MB9BFX64, MB9BFX65, MB9BFX66, MB9BFX67, MB9BFX68, and fm4_flash_bank::variant.
Referenced by fm4_probe().
|
static |
Definition at line 637 of file fm4.c.
References bank, ERROR_FLASH_OPER_UNSUPPORTED, ERROR_OK, fm4_name_match(), LOG_WARNING, S6E2CX8, S6E2CX9, S6E2CXA, and fm4_flash_bank::variant.
|
static |
Definition at line 393 of file fm4.c.
References flash_sector::is_erased, flash_sector::is_protected, and flash_sector::size.
Referenced by s6e2cc_probe().
|
static |
Definition at line 406 of file fm4.c.
References bank, DFCTRLR, DFCTRLR_DFE, ERROR_FLASH_OPER_UNSUPPORTED, ERROR_OK, LOG_DEBUG, LOG_WARNING, fm4_flash_bank::macro_nr, s6e2cc_init_sector(), S6E2CX8, S6E2CX9, S6E2CXA, target_read_u32(), and fm4_flash_bank::variant.
Referenced by fm4_probe().
|
static |
const struct flash_driver fm4_flash |