OpenOCD
|
Go to the source code of this file.
Macros | |
#define | ADUCM360_FLASH_BASE 0x40002800 |
#define | ADUCM360_FLASH_FEEADR0H 0x0014 |
#define | ADUCM360_FLASH_FEEADR0L 0x0010 |
#define | ADUCM360_FLASH_FEEADR1H 0x001C |
#define | ADUCM360_FLASH_FEEADR1L 0x0018 |
#define | ADUCM360_FLASH_FEEADRAH 0x004C |
#define | ADUCM360_FLASH_FEEADRAL 0x0048 |
#define | ADUCM360_FLASH_FEEAEN0 0x0078 |
#define | ADUCM360_FLASH_FEEAEN1 0x007C |
#define | ADUCM360_FLASH_FEEAEN2 0x0080 |
#define | ADUCM360_FLASH_FEECMD 0x0008 |
#define | ADUCM360_FLASH_FEECON0 0x0004 |
#define | ADUCM360_FLASH_FEECON1 0x0038 |
#define | ADUCM360_FLASH_FEEKEY 0x0020 |
#define | ADUCM360_FLASH_FEEPROH 0x002C |
#define | ADUCM360_FLASH_FEEPROL 0x0028 |
#define | ADUCM360_FLASH_FEESIGH 0x0034 |
#define | ADUCM360_FLASH_FEESIGL 0x0030 |
#define | ADUCM360_FLASH_FEESTA 0x0000 |
#define | FEESTA_WRDONE 0x00000008 |
#define | FLASH_SECTOR_SIZE 512 |
Functions | |
static int | aducm360_build_sector_list (struct flash_bank *bank) |
static int | aducm360_check_flash_completion (struct target *target, unsigned int timeout_ms) |
static int | aducm360_erase (struct flash_bank *bank, unsigned int first, unsigned int last) |
static int | aducm360_mass_erase (struct target *target) |
static int | aducm360_page_erase (struct target *target, uint32_t padd) |
static int | aducm360_probe (struct flash_bank *bank) |
static int | aducm360_set_write_enable (struct target *target, int enable) |
static int | aducm360_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
static int | aducm360_write_block (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
static int | aducm360_write_block_async (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
static int | aducm360_write_block_sync (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
static int | aducm360_write_modified (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
FLASH_BANK_COMMAND_HANDLER (aducm360_flash_bank_command) | |
Variables | |
const struct flash_driver | aducm360_flash |
#define ADUCM360_FLASH_BASE 0x40002800 |
Definition at line 41 of file aducm360.c.
#define ADUCM360_FLASH_FEEADR0H 0x0014 |
Definition at line 46 of file aducm360.c.
#define ADUCM360_FLASH_FEEADR0L 0x0010 |
Definition at line 45 of file aducm360.c.
#define ADUCM360_FLASH_FEEADR1H 0x001C |
Definition at line 48 of file aducm360.c.
#define ADUCM360_FLASH_FEEADR1L 0x0018 |
Definition at line 47 of file aducm360.c.
#define ADUCM360_FLASH_FEEADRAH 0x004C |
Definition at line 56 of file aducm360.c.
#define ADUCM360_FLASH_FEEADRAL 0x0048 |
Definition at line 55 of file aducm360.c.
#define ADUCM360_FLASH_FEEAEN0 0x0078 |
Definition at line 57 of file aducm360.c.
#define ADUCM360_FLASH_FEEAEN1 0x007C |
Definition at line 58 of file aducm360.c.
#define ADUCM360_FLASH_FEEAEN2 0x0080 |
Definition at line 59 of file aducm360.c.
#define ADUCM360_FLASH_FEECMD 0x0008 |
Definition at line 44 of file aducm360.c.
#define ADUCM360_FLASH_FEECON0 0x0004 |
Definition at line 43 of file aducm360.c.
#define ADUCM360_FLASH_FEECON1 0x0038 |
Definition at line 54 of file aducm360.c.
#define ADUCM360_FLASH_FEEKEY 0x0020 |
Definition at line 49 of file aducm360.c.
#define ADUCM360_FLASH_FEEPROH 0x002C |
Definition at line 51 of file aducm360.c.
#define ADUCM360_FLASH_FEEPROL 0x0028 |
Definition at line 50 of file aducm360.c.
#define ADUCM360_FLASH_FEESIGH 0x0034 |
Definition at line 53 of file aducm360.c.
#define ADUCM360_FLASH_FEESIGL 0x0030 |
Definition at line 52 of file aducm360.c.
#define ADUCM360_FLASH_FEESTA 0x0000 |
Definition at line 42 of file aducm360.c.
#define FEESTA_WRDONE 0x00000008 |
Definition at line 435 of file aducm360.c.
#define FLASH_SECTOR_SIZE 512 |
Definition at line 72 of file aducm360.c.
|
static |
Definition at line 75 of file aducm360.c.
References bank, ERROR_OK, FLASH_SECTOR_SIZE, and offset.
Referenced by FLASH_BANK_COMMAND_HANDLER().
|
static |
Definition at line 523 of file aducm360.c.
References ADUCM360_FLASH_BASE, ADUCM360_FLASH_FEESTA, alive_sleep(), ERROR_FAIL, ERROR_OK, target_read_u32(), and timeval_ms().
Referenced by aducm360_mass_erase(), and aducm360_page_erase().
|
static |
Definition at line 155 of file aducm360.c.
References aducm360_mass_erase(), aducm360_page_erase(), bank, count, ERROR_OK, and FLASH_SECTOR_SIZE.
|
static |
Definition at line 94 of file aducm360.c.
References aducm360_check_flash_completion(), ADUCM360_FLASH_BASE, ADUCM360_FLASH_FEECMD, ADUCM360_FLASH_FEEKEY, ADUCM360_FLASH_FEESTA, aducm360_set_write_enable(), ERROR_FLASH_OPERATION_FAILED, ERROR_OK, LOG_ERROR, target_read_u32(), and target_write_u32().
Referenced by aducm360_erase().
|
static |
Definition at line 123 of file aducm360.c.
References aducm360_check_flash_completion(), ADUCM360_FLASH_BASE, ADUCM360_FLASH_FEEADR0H, ADUCM360_FLASH_FEEADR0L, ADUCM360_FLASH_FEECMD, ADUCM360_FLASH_FEEKEY, ADUCM360_FLASH_FEESTA, aducm360_set_write_enable(), ERROR_FLASH_OPERATION_FAILED, ERROR_OK, LOG_ERROR, target_read_u32(), and target_write_u32().
Referenced by aducm360_erase().
|
static |
Definition at line 494 of file aducm360.c.
References ERROR_OK.
|
static |
Definition at line 502 of file aducm360.c.
References ADUCM360_FLASH_BASE, ADUCM360_FLASH_FEECON0, ERROR_OK, target_read_u32(), and target_write_u32().
Referenced by aducm360_mass_erase(), aducm360_page_erase(), and aducm360_write_modified().
|
static |
Definition at line 471 of file aducm360.c.
References aducm360_write_block(), aducm360_write_modified(), bank, buffer, count, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, LOG_ERROR, LOG_WARNING, and offset.
|
static |
Definition at line 416 of file aducm360.c.
References aducm360_write_block_async(), aducm360_write_block_sync(), bank, buffer, count, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, LOG_ERROR, and offset.
Referenced by aducm360_write().
|
static |
Definition at line 300 of file aducm360.c.
References 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, count, destroy_reg_param(), ERROR_FAIL, ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, init_reg_param(), LOG_DEBUG, LOG_ERROR, LOG_WARNING, NULL, offset, PARAM_IN, PARAM_OUT, working_area::size, target_alloc_working_area(), target_alloc_working_area_try(), target_buffer_set_u32_array(), target_free_working_area(), target_run_flash_async_algorithm(), and target_write_buffer().
Referenced by aducm360_write_block().
|
static |
Definition at line 180 of file aducm360.c.
References 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, count, destroy_reg_param(), ERROR_FAIL, ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, init_reg_param(), LOG_DEBUG, LOG_ERROR, LOG_WARNING, NULL, offset, PARAM_IN, PARAM_OUT, target_alloc_working_area(), target_alloc_working_area_try(), target_buffer_set_u32_array(), target_free_working_area(), target_run_algorithm(), and target_write_buffer().
Referenced by aducm360_write_block().
|
static |
Definition at line 437 of file aducm360.c.
References ADUCM360_FLASH_BASE, ADUCM360_FLASH_FEESTA, aducm360_set_write_enable(), bank, buffer, count, ERROR_OK, FEESTA_WRDONE, LOG_DEBUG, offset, target_read_u32(), and target_write_u32().
Referenced by aducm360_write().
FLASH_BANK_COMMAND_HANDLER | ( | aducm360_flash_bank_command | ) |
Definition at line 62 of file aducm360.c.
References aducm360_build_sector_list(), bank, and ERROR_OK.
const struct flash_driver aducm360_flash |
Definition at line 523 of file aducm360.c.