|
OpenOCD
|

Go to the source code of this file.
Data Structures | |
| struct | bl602_flash_bank |
| struct | bl602_part_info |
Macros | |
| #define | BL602_DEFAULT_TIMEOUT_MS 5000 |
| #define | SFLASH_CFG_BUSY_BIT_POS 0x2D |
| #define | SFLASH_CFG_BUSY_INDEX_POS 0x2A |
| #define | SFLASH_CFG_BUSY_READ_REG_LEN_POS 0x33 |
| #define | SFLASH_CFG_FAST_READ_CMD_POS 0x18 |
| #define | SFLASH_CFG_JEDEC_ID_CMD_DMY_CLK_POS 0x09 |
| #define | SFLASH_CFG_JEDEC_ID_CMD_POS 0x08 |
| #define | SFLASH_CFG_PAGE_PROGRAM_CMD_POS 0x15 |
| #define | SFLASH_CFG_PAGE_SIZE_POS 0x0E |
| #define | SFLASH_CFG_READ_STATUS_REG1_POS 0x34 |
| #define | SFLASH_CFG_SECTOR_ERASE_CMD_POS 0x11 |
| #define | SFLASH_CFG_SECTOR_SIZE_POS 0x0C |
| #define | SFLASH_CFG_SIZE 84 |
| #define | SFLASH_CFG_TIME_ERASE_SECTOR_POS 0x48 |
| #define | SFLASH_CFG_TIME_PAGE_PGM_POS 0x4E |
| #define | SFLASH_CFG_WRITE_ENABLE_BIT_POS 0x2B |
| #define | SFLASH_CFG_WRITE_ENABLE_CMD_POS 0x14 |
| #define | SFLASH_CFG_WRITE_ENABLE_INDEX_POS 0x28 |
| #define | SFLASH_CFG_WRITE_ENABLE_READ_REG_LEN_POS 0x2F |
Enumerations | |
| enum | bflb_series { BFLB_SERIES_BL602 , BFLB_SERIES_BL702 , BFLB_SERIES_BL702L } |
Functions | |
| static int | bl602_alloc_bounce_buffer (struct flash_bank *bank, struct working_area **working_area, uint32_t count) |
| static int | bl602_alloc_sflash_cfg (struct flash_bank *bank, struct working_area **working_area) |
| static int | bl602_auto_probe (struct flash_bank *bank) |
| static int | bl602_call_func (struct target *target, uint32_t func_addr, uint32_t arg_data[], unsigned int n_args, uint32_t *return_data, unsigned int timeout_ms) |
| static int | bl602_call_romapi_func (struct target *target, uint32_t romapi_func_addr, uint32_t arg_data[], unsigned int n_args, uint32_t *return_data, unsigned int timeout_ms) |
| static int | bl602_erase (struct flash_bank *bank, unsigned int first, unsigned int last) |
| static int | bl602_flash_gpio_init (struct flash_bank *bank) |
| static int | bl602_flash_init (struct flash_bank *bank) |
| static int | bl602_flash_read_id (struct flash_bank *bank, uint32_t *jedec_id) |
| static int | bl602_probe (struct flash_bank *bank) |
| static int | bl602_read (struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count) |
| static int | bl602_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
| FLASH_BANK_COMMAND_HANDLER (bl602_flash_bank_command) | |
Variables | |
| const struct flash_driver | bl602_flash |
| static const struct bl602_part_info | bl602_parts [] |
| static const uint8_t | bl602_sflash_ctrl_cfg [] |
| static const uint8_t | bl702l_sflash_ctrl_cfg [] |
| enum bflb_series |
|
static |
Definition at line 202 of file bl602.c.
References bank, count, ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, LOG_DEBUG, LOG_ERROR, MAX, MIN, priv, TARGET_ADDR_FMT, target_alloc_working_area(), and target_get_working_area_avail().
Referenced by bl602_read(), and bl602_write().
|
static |
Definition at line 228 of file bl602.c.
References bank, ERROR_OK, LOG_ERROR, priv, target_alloc_working_area(), target_free_working_area(), and target_write_buffer().
Referenced by bl602_erase(), bl602_read(), and bl602_write().
|
static |
|
static |
Definition at line 117 of file bl602.c.
References working_area::address, ARRAY_SIZE, buf_get_u32(), buf_set_u32(), destroy_reg_param(), reg_param::direction, ebreak(), ERROR_OK, init_reg_param(), LOG_ERROR, NULL, PARAM_IN, PARAM_IN_OUT, PARAM_OUT, target_alloc_working_area(), target_free_working_area(), TARGET_PRIxADDR, target_run_algorithm(), and target_write_buffer().
Referenced by bl602_call_romapi_func().
|
static |
Definition at line 190 of file bl602.c.
References bl602_call_func(), ERROR_OK, and target_read_u32().
Referenced by bl602_erase(), bl602_flash_gpio_init(), bl602_flash_init(), bl602_flash_read_id(), bl602_read(), and bl602_write().
|
static |
Definition at line 430 of file bl602.c.
References working_area::address, ARRAY_SIZE, bank, bl602_alloc_sflash_cfg(), bl602_call_romapi_func(), BL602_DEFAULT_TIMEOUT_MS, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_ERROR, LOG_INFO, NULL, priv, bl602_part_info::romapi_sflash_erase_sector, target::state, target_free_working_area(), and TARGET_HALTED.
|
static |
Definition at line 248 of file bl602.c.
References ARRAY_SIZE, bank, BFLB_SERIES_BL602, BFLB_SERIES_BL702, BFLB_SERIES_BL702L, bl602_call_romapi_func(), BL602_DEFAULT_TIMEOUT_MS, ERROR_OK, LOG_ERROR, NULL, priv, bl602_part_info::romapi_sflash_init_gpio, bl602_part_info::series, and target_read_u32().
Referenced by bl602_flash_init().
|
static |
Definition at line 322 of file bl602.c.
References working_area::address, ARRAY_SIZE, bank, BFLB_SERIES_BL602, BFLB_SERIES_BL702, BFLB_SERIES_BL702L, bl602_call_romapi_func(), BL602_DEFAULT_TIMEOUT_MS, bl602_flash_gpio_init(), bl602_sflash_ctrl_cfg, bl702l_sflash_ctrl_cfg, ERROR_NOT_IMPLEMENTED, ERROR_OK, LOG_ERROR, LOG_WARNING, NULL, priv, bl602_part_info::romapi_sflash_init, bl602_part_info::series, target_alloc_working_area(), target_free_working_area(), and target_write_buffer().
Referenced by bl602_probe().
|
static |
Definition at line 383 of file bl602.c.
References working_area::address, ARRAY_SIZE, bank, bl602_call_romapi_func(), BL602_DEFAULT_TIMEOUT_MS, ERROR_OK, LOG_ERROR, NULL, priv, bl602_part_info::romapi_get_jedec_id, SFLASH_CFG_SIZE, target_alloc_working_area(), target_free_working_area(), target_read_u32(), and target_write_buffer().
Referenced by bl602_probe().
|
static |
Definition at line 615 of file bl602.c.
References alloc_block_array(), ARRAY_SIZE, bank, bl602_flash_init(), bl602_flash_read_id(), bl602_parts, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_EXAMINED, flash_devices, bl602_part_info::idcode, jtag_tap::idcode, LOG_ERROR, LOG_INFO, flash_device::name, NULL, priv, bl602_part_info::series, SFLASH_CFG_FAST_READ_CMD_POS, SFLASH_CFG_PAGE_PROGRAM_CMD_POS, SFLASH_CFG_PAGE_SIZE_POS, SFLASH_CFG_SECTOR_ERASE_CMD_POS, SFLASH_CFG_SECTOR_SIZE_POS, target::tap, and target_was_examined().
Referenced by bl602_auto_probe().
|
static |
Definition at line 544 of file bl602.c.
References working_area::address, ARRAY_SIZE, bank, bl602_alloc_bounce_buffer(), bl602_alloc_sflash_cfg(), bl602_call_romapi_func(), BL602_DEFAULT_TIMEOUT_MS, buffer, count, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_DEBUG, LOG_ERROR, LOG_WARNING, NULL, offset, priv, bl602_part_info::romapi_sflash_read, working_area::size, target::state, target_free_working_area(), TARGET_HALTED, and target_read_buffer().
|
static |
Definition at line 472 of file bl602.c.
References working_area::address, ARRAY_SIZE, bank, bl602_alloc_bounce_buffer(), bl602_alloc_sflash_cfg(), bl602_call_romapi_func(), BL602_DEFAULT_TIMEOUT_MS, buffer, count, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARNING, NULL, offset, priv, bl602_part_info::romapi_sflash_program, working_area::size, target::state, target_free_working_area(), TARGET_HALTED, and target_write_buffer().
| const struct flash_driver bl602_flash |
|
static |
Definition at line 1 of file bl602.c.
Referenced by bl602_probe().
|
static |
Definition at line 309 of file bl602.c.
Referenced by bl602_flash_init().
|
static |
Definition at line 316 of file bl602.c.
Referenced by bl602_flash_init().