OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | stm32x_flash_bank |
struct | stm32x_options |
Macros | |
#define | FLASH_BANK_BASE 0x80000000 |
#define | FLASH_BSY (1 << 16) |
#define | FLASH_ERASE_TIMEOUT 10000 |
#define | FLASH_ERROR (FLASH_PGSERR | FLASH_PGPERR | FLASH_PGAERR | FLASH_WRPERR | FLASH_OPERR) |
#define | FLASH_LOCK (1 << 31) |
#define | FLASH_MASS_ERASE_TIMEOUT 33000 |
#define | FLASH_MER (1 << 2) /* MER/MER1 for f76x/77x */ |
#define | FLASH_MER1 (1 << 15) /* MER2 for f76x/77x, confusing ... */ |
#define | FLASH_OPERR (1 << 1) /* Operation error */ |
#define | FLASH_PG (1 << 0) |
#define | FLASH_PGAERR (1 << 5) /* Programming alignment error */ |
#define | FLASH_PGPERR (1 << 6) /* Programming parallelism error */ |
#define | FLASH_PGSERR (1 << 7) /* Programming sequence error */ |
#define | FLASH_PSIZE_16 (1 << 8) |
#define | FLASH_PSIZE_32 (2 << 8) |
#define | FLASH_PSIZE_64 (3 << 8) |
#define | FLASH_PSIZE_8 (0 << 8) |
#define | FLASH_SER (1 << 1) |
#define | FLASH_SNB(a) ((a) << 3) |
#define | FLASH_STRT (1 << 16) |
#define | FLASH_WRITE_TIMEOUT 5 |
#define | FLASH_WRPERR (1 << 4) /* Write protection error */ |
#define | KEY1 0x45670123 |
#define | KEY2 0xCDEF89AB |
#define | OPTCR2_PCROP_RDP (1 << 31) /* erase PCROP zone when decreasing RDP */ |
#define | OPTCR_DB1M (1 << 30) /* 1 MiB devices dual flash bank option */ |
#define | OPTCR_LOCK (1 << 0) |
#define | OPTCR_NDBANK (1 << 29) /* not dual bank mode */ |
#define | OPTCR_SPRMOD (1 << 31) /* switches PCROPi/nWPRi interpretation */ |
#define | OPTCR_START (1 << 1) |
#define | OPTKEY1 0x08192A3B |
#define | OPTKEY2 0x4C5D6E7F |
#define | STM32_FLASH_ACR 0x40023c00 |
#define | STM32_FLASH_BASE 0x40023c00 |
#define | STM32_FLASH_CR 0x40023c10 |
#define | STM32_FLASH_KEYR 0x40023c04 |
#define | STM32_FLASH_OPTCR 0x40023c14 |
#define | STM32_FLASH_OPTCR1 0x40023c18 |
#define | STM32_FLASH_OPTCR2 0x40023c1c |
#define | STM32_FLASH_OPTKEYR 0x40023c08 |
#define | STM32_FLASH_SR 0x40023c0C |
#define | STM32F2_OTP_BANK_BASE 0x1fff7800 |
#define | STM32F2_OTP_LOCK_BASE ((STM32F2_OTP_BANK_BASE) + (STM32F2_OTP_SIZE)) |
#define | STM32F2_OTP_SECTOR_SIZE 32 |
#define | STM32F2_OTP_SIZE 512 |
#define | STM32F7_OTP_BANK_BASE 0x1ff0f000 |
#define | STM32F7_OTP_LOCK_BASE ((STM32F7_OTP_BANK_BASE) + (STM32F7_OTP_SIZE)) |
#define | STM32F7_OTP_SECTOR_SIZE 64 |
#define | STM32F7_OTP_SIZE 1024 |
Functions | |
static unsigned int | calculate_number_of_sectors (struct flash_bank *bank, uint16_t flash_size_in_kb, uint16_t max_sector_size_in_kb) |
COMMAND_HANDLER (stm32f2x_handle_optcr2_write_command) | |
COMMAND_HANDLER (stm32f2x_handle_options_read_command) | |
COMMAND_HANDLER (stm32f2x_handle_options_write_command) | |
COMMAND_HANDLER (stm32x_handle_lock_command) | |
COMMAND_HANDLER (stm32x_handle_mass_erase_command) | |
COMMAND_HANDLER (stm32x_handle_otp_command) | |
COMMAND_HANDLER (stm32x_handle_unlock_command) | |
FLASH_BANK_COMMAND_HANDLER (stm32x_flash_bank_command) | |
static int | get_stm32x_info (struct flash_bank *bank, struct command_invocation *cmd) |
static uint16_t | sector_size_in_kb (unsigned int i, uint16_t max_sector_size_in_kb) |
static void | setup_bank (struct flash_bank *bank, unsigned int start, uint16_t flash_size_in_kb, uint16_t max_sector_size_in_kb) |
static void | setup_sector (struct flash_bank *bank, unsigned int i, unsigned int size) |
static int | stm32x_auto_probe (struct flash_bank *bank) |
static int | stm32x_erase (struct flash_bank *bank, unsigned int first, unsigned int last) |
static int | stm32x_get_device_id (struct flash_bank *bank, uint32_t *device_id) |
static int | stm32x_get_flash_reg (struct flash_bank *bank, uint32_t reg) |
static int | stm32x_get_flash_status (struct flash_bank *bank, uint32_t *status) |
static bool | stm32x_is_otp (struct flash_bank *bank) |
static int | stm32x_is_otp_unlocked (struct flash_bank *bank) |
static int | stm32x_mass_erase (struct flash_bank *bank) |
static int | stm32x_otp_disable (struct flash_bank *bank) |
static int | stm32x_otp_enable (struct flash_bank *bank) |
static bool | stm32x_otp_is_f7 (struct flash_bank *bank) |
static int | stm32x_otp_protect (struct flash_bank *bank, unsigned int first, unsigned int last) |
static int | stm32x_otp_read_protect (struct flash_bank *bank) |
static int | stm32x_probe (struct flash_bank *bank) |
static int | stm32x_protect (struct flash_bank *bank, int set, unsigned int first, unsigned int last) |
static int | stm32x_protect_check (struct flash_bank *bank) |
static int | stm32x_read_options (struct flash_bank *bank) |
static int | stm32x_unlock_option_reg (struct target *target) |
static int | stm32x_unlock_reg (struct target *target) |
static int | stm32x_wait_status_busy (struct flash_bank *bank, int timeout) |
static int | stm32x_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
static int | stm32x_write_block (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
static int | stm32x_write_options (struct flash_bank *bank) |
Variables | |
static const struct command_registration | stm32f2x_command_handlers [] |
static const struct command_registration | stm32f2x_exec_command_handlers [] |
const struct flash_driver | stm32f2x_flash |
#define FLASH_BANK_BASE 0x80000000 |
Definition at line 115 of file stm32f2x.c.
#define FLASH_BSY (1 << 16) |
Definition at line 153 of file stm32f2x.c.
#define FLASH_ERASE_TIMEOUT 10000 |
Definition at line 109 of file stm32f2x.c.
#define FLASH_ERROR (FLASH_PGSERR | FLASH_PGPERR | FLASH_PGAERR | FLASH_WRPERR | FLASH_OPERR) |
Definition at line 160 of file stm32f2x.c.
#define FLASH_LOCK (1 << 31) |
Definition at line 150 of file stm32f2x.c.
#define FLASH_MASS_ERASE_TIMEOUT 33000 |
Definition at line 113 of file stm32f2x.c.
#define FLASH_MER (1 << 2) /* MER/MER1 for f76x/77x */ |
Definition at line 141 of file stm32f2x.c.
#define FLASH_MER1 (1 << 15) /* MER2 for f76x/77x, confusing ... */ |
Definition at line 142 of file stm32f2x.c.
#define FLASH_OPERR (1 << 1) /* Operation error */ |
Definition at line 158 of file stm32f2x.c.
#define FLASH_PG (1 << 0) |
Definition at line 139 of file stm32f2x.c.
#define FLASH_PGAERR (1 << 5) /* Programming alignment error */ |
Definition at line 156 of file stm32f2x.c.
#define FLASH_PGPERR (1 << 6) /* Programming parallelism error */ |
Definition at line 155 of file stm32f2x.c.
#define FLASH_PGSERR (1 << 7) /* Programming sequence error */ |
Definition at line 154 of file stm32f2x.c.
#define FLASH_PSIZE_16 (1 << 8) |
Definition at line 145 of file stm32f2x.c.
#define FLASH_PSIZE_32 (2 << 8) |
Definition at line 146 of file stm32f2x.c.
#define FLASH_PSIZE_64 (3 << 8) |
Definition at line 147 of file stm32f2x.c.
#define FLASH_PSIZE_8 (0 << 8) |
Definition at line 144 of file stm32f2x.c.
#define FLASH_SER (1 << 1) |
Definition at line 140 of file stm32f2x.c.
#define FLASH_SNB | ( | a | ) | ((a) << 3) |
Definition at line 149 of file stm32f2x.c.
#define FLASH_STRT (1 << 16) |
Definition at line 143 of file stm32f2x.c.
#define FLASH_WRITE_TIMEOUT 5 |
Definition at line 110 of file stm32f2x.c.
#define FLASH_WRPERR (1 << 4) /* Write protection error */ |
Definition at line 157 of file stm32f2x.c.
#define KEY1 0x45670123 |
Definition at line 173 of file stm32f2x.c.
#define KEY2 0xCDEF89AB |
Definition at line 174 of file stm32f2x.c.
#define OPTCR2_PCROP_RDP (1 << 31) /* erase PCROP zone when decreasing RDP */ |
Definition at line 170 of file stm32f2x.c.
Definition at line 166 of file stm32f2x.c.
#define OPTCR_LOCK (1 << 0) |
Definition at line 163 of file stm32f2x.c.
Definition at line 165 of file stm32f2x.c.
#define OPTCR_SPRMOD (1 << 31) /* switches PCROPi/nWPRi interpretation */ |
Definition at line 167 of file stm32f2x.c.
#define OPTCR_START (1 << 1) |
Definition at line 164 of file stm32f2x.c.
#define OPTKEY1 0x08192A3B |
Definition at line 177 of file stm32f2x.c.
#define OPTKEY2 0x4C5D6E7F |
Definition at line 178 of file stm32f2x.c.
#define STM32_FLASH_ACR 0x40023c00 |
Definition at line 129 of file stm32f2x.c.
#define STM32_FLASH_BASE 0x40023c00 |
Definition at line 128 of file stm32f2x.c.
#define STM32_FLASH_CR 0x40023c10 |
Definition at line 133 of file stm32f2x.c.
#define STM32_FLASH_KEYR 0x40023c04 |
Definition at line 130 of file stm32f2x.c.
#define STM32_FLASH_OPTCR 0x40023c14 |
Definition at line 134 of file stm32f2x.c.
#define STM32_FLASH_OPTCR1 0x40023c18 |
Definition at line 135 of file stm32f2x.c.
#define STM32_FLASH_OPTCR2 0x40023c1c |
Definition at line 136 of file stm32f2x.c.
#define STM32_FLASH_OPTKEYR 0x40023c08 |
Definition at line 131 of file stm32f2x.c.
#define STM32_FLASH_SR 0x40023c0C |
Definition at line 132 of file stm32f2x.c.
#define STM32F2_OTP_BANK_BASE 0x1fff7800 |
Definition at line 119 of file stm32f2x.c.
#define STM32F2_OTP_LOCK_BASE ((STM32F2_OTP_BANK_BASE) + (STM32F2_OTP_SIZE)) |
Definition at line 120 of file stm32f2x.c.
#define STM32F2_OTP_SECTOR_SIZE 32 |
Definition at line 118 of file stm32f2x.c.
#define STM32F2_OTP_SIZE 512 |
Definition at line 117 of file stm32f2x.c.
#define STM32F7_OTP_BANK_BASE 0x1ff0f000 |
Definition at line 125 of file stm32f2x.c.
#define STM32F7_OTP_LOCK_BASE ((STM32F7_OTP_BANK_BASE) + (STM32F7_OTP_SIZE)) |
Definition at line 126 of file stm32f2x.c.
#define STM32F7_OTP_SECTOR_SIZE 64 |
Definition at line 123 of file stm32f2x.c.
#define STM32F7_OTP_SIZE 1024 |
Definition at line 124 of file stm32f2x.c.
|
static |
Definition at line 902 of file stm32f2x.c.
References bank, stm32x_flash_bank::has_large_mem, LOG_INFO, and sector_size_in_kb().
Referenced by stm32x_probe().
COMMAND_HANDLER | ( | stm32f2x_handle_optcr2_write_command | ) |
Definition at line 1668 of file stm32f2x.c.
References bank, CALL_COMMAND_HANDLER, CMD, CMD_ARGC, CMD_ARGV, COMMAND_PARSE_NUMBER, command_print(), ERROR_COMMAND_ARGUMENT_INVALID, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, stm32x_flash_bank::has_optcr2_pcrop, NULL, stm32x_options::optcr2_pcrop, stm32x_flash_bank::option_bytes, stm32x_read_options(), and stm32x_write_options().
COMMAND_HANDLER | ( | stm32f2x_handle_options_read_command | ) |
Definition at line 1561 of file stm32f2x.c.
References bank, stm32x_options::boot_addr, CALL_COMMAND_HANDLER, CMD, CMD_ARGC, command_print(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, stm32x_flash_bank::has_boot_addr, stm32x_flash_bank::has_extra_options, stm32x_flash_bank::has_optcr2_pcrop, NULL, stm32x_options::optcr2_pcrop, stm32x_flash_bank::option_bytes, stm32x_read_options(), and stm32x_options::user_options.
COMMAND_HANDLER | ( | stm32f2x_handle_options_write_command | ) |
Definition at line 1606 of file stm32f2x.c.
References bank, stm32x_options::boot_addr, CALL_COMMAND_HANDLER, CMD, CMD_ARGC, CMD_ARGV, COMMAND_PARSE_NUMBER, command_print(), ERROR_COMMAND_ARGUMENT_INVALID, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, stm32x_flash_bank::has_boot_addr, stm32x_flash_bank::has_extra_options, NULL, stm32x_flash_bank::option_bytes, stm32x_flash_bank::probed, stm32x_flash_bank::protection_bits, stm32x_read_options(), stm32x_write_options(), and stm32x_options::user_options.
COMMAND_HANDLER | ( | stm32x_handle_lock_command | ) |
Definition at line 1412 of file stm32f2x.c.
References bank, CALL_COMMAND_HANDLER, CMD, CMD_ARGC, command_print(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, LOG_INFO, NULL, stm32x_flash_bank::option_bytes, stm32x_options::RDP, target::state, stm32x_read_options(), stm32x_write_options(), and TARGET_HALTED.
COMMAND_HANDLER | ( | stm32x_handle_mass_erase_command | ) |
Definition at line 1539 of file stm32f2x.c.
References bank, CALL_COMMAND_HANDLER, CMD, CMD_ARGC, command_print(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, and stm32x_mass_erase().
COMMAND_HANDLER | ( | stm32x_handle_otp_command | ) |
Definition at line 1710 of file stm32f2x.c.
References bank, CALL_COMMAND_HANDLER, CMD, CMD_ARGC, CMD_ARGV, command_print(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, stm32x_is_otp(), stm32x_is_otp_unlocked(), stm32x_otp_disable(), and stm32x_otp_enable().
COMMAND_HANDLER | ( | stm32x_handle_unlock_command | ) |
Definition at line 1451 of file stm32f2x.c.
References bank, CALL_COMMAND_HANDLER, CMD, CMD_ARGC, command_print(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, stm32x_flash_bank::has_optcr2_pcrop, LOG_INFO, NULL, stm32x_options::optcr2_pcrop, OPTCR2_PCROP_RDP, stm32x_flash_bank::option_bytes, stm32x_options::RDP, target::state, stm32x_read_options(), stm32x_write_options(), and TARGET_HALTED.
FLASH_BANK_COMMAND_HANDLER | ( | stm32x_flash_bank_command | ) |
Definition at line 245 of file stm32f2x.c.
References bank, CMD_ARGC, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, stm32x_flash_bank::otp_unlocked, stm32x_flash_bank::probed, and stm32x_flash_bank::user_bank_size.
|
static |
Definition at line 1235 of file stm32f2x.c.
References bank, cmd, command_print_sameline(), ERROR_FAIL, ERROR_OK, NULL, and stm32x_get_device_id().
|
static |
Definition at line 893 of file stm32f2x.c.
Referenced by calculate_number_of_sectors(), and setup_bank().
|
static |
Definition at line 929 of file stm32f2x.c.
References bank, sector_size_in_kb(), setup_sector(), and start.
Referenced by stm32x_probe().
|
static |
Definition at line 883 of file stm32f2x.c.
References bank, LOG_DEBUG, and size.
Referenced by setup_bank().
|
static |
Definition at line 1227 of file stm32f2x.c.
References bank, ERROR_OK, stm32x_flash_bank::probed, and stm32x_probe().
|
static |
Definition at line 592 of file stm32f2x.c.
References bank, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, FLASH_ERASE_TIMEOUT, FLASH_LOCK, FLASH_SER, FLASH_SNB, FLASH_STRT, stm32x_flash_bank::has_large_mem, LOG_ERROR, STM32_FLASH_CR, stm32x_get_flash_reg(), stm32x_is_otp(), stm32x_unlock_reg(), stm32x_wait_status_busy(), TARGET_HALTED, and target_write_u32().
|
static |
Definition at line 947 of file stm32f2x.c.
References bank, CORTEX_M4_PARTNO, cortex_m_get_partno_safe(), ERROR_OK, LOG_INFO, and target_read_u32().
Referenced by get_stm32x_info(), and stm32x_probe().
|
inlinestatic |
Definition at line 262 of file stm32f2x.c.
Referenced by stm32x_erase(), stm32x_get_flash_status(), stm32x_mass_erase(), stm32x_wait_status_busy(), and stm32x_write().
|
inlinestatic |
Definition at line 267 of file stm32f2x.c.
References bank, status, STM32_FLASH_SR, stm32x_get_flash_reg(), and target_read_u32().
Referenced by stm32x_wait_status_busy().
|
static |
Definition at line 200 of file stm32f2x.c.
References bank, STM32F2_OTP_BANK_BASE, and STM32F7_OTP_BANK_BASE.
Referenced by COMMAND_HANDLER(), stm32x_erase(), stm32x_probe(), stm32x_protect(), stm32x_protect_check(), and stm32x_write_block().
|
static |
Definition at line 211 of file stm32f2x.c.
References bank, and stm32x_flash_bank::otp_unlocked.
Referenced by COMMAND_HANDLER(), and stm32x_write_block().
|
static |
Definition at line 1496 of file stm32f2x.c.
References bank, ERROR_OK, ERROR_TARGET_NOT_HALTED, FLASH_LOCK, FLASH_MASS_ERASE_TIMEOUT, FLASH_MER, FLASH_MER1, FLASH_STRT, stm32x_flash_bank::has_large_mem, LOG_ERROR, NULL, target::state, STM32_FLASH_CR, stm32x_get_flash_reg(), stm32x_unlock_reg(), stm32x_wait_status_busy(), TARGET_HALTED, and target_write_u32().
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 218 of file stm32f2x.c.
References bank, ERROR_OK, LOG_INFO, and stm32x_flash_bank::otp_unlocked.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 228 of file stm32f2x.c.
References bank, ERROR_OK, LOG_INFO, LOG_WARNING, and stm32x_flash_bank::otp_unlocked.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 206 of file stm32f2x.c.
References bank, and STM32F7_OTP_BANK_BASE.
Referenced by stm32x_otp_protect(), stm32x_otp_read_protect(), and stm32x_probe().
|
static |
Definition at line 530 of file stm32f2x.c.
References bank, ERROR_OK, STM32F2_OTP_LOCK_BASE, STM32F7_OTP_LOCK_BASE, stm32x_otp_is_f7(), target_read_u8(), and target_write_u8().
Referenced by stm32x_protect().
|
static |
Definition at line 510 of file stm32f2x.c.
References bank, ERROR_OK, STM32F2_OTP_LOCK_BASE, STM32F7_OTP_LOCK_BASE, stm32x_otp_is_f7(), and target_read_u8().
Referenced by stm32x_protect_check().
|
static |
Definition at line 970 of file stm32f2x.c.
References bank, calculate_number_of_sectors(), ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_EXAMINED, stm32x_flash_bank::has_boot_addr, stm32x_flash_bank::has_extra_options, stm32x_flash_bank::has_large_mem, stm32x_flash_bank::has_optcr2_pcrop, LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARNING, NULL, OPTCR_DB1M, OPTCR_NDBANK, stm32x_flash_bank::probed, stm32x_flash_bank::protection_bits, setup_bank(), size, STM32_FLASH_OPTCR, STM32F2_OTP_SECTOR_SIZE, STM32F2_OTP_SIZE, STM32F7_OTP_SECTOR_SIZE, STM32F7_OTP_SIZE, stm32x_get_device_id(), stm32x_is_otp(), stm32x_otp_is_f7(), target_read_u16(), target_read_u32(), target_was_examined(), and stm32x_flash_bank::user_bank_size.
Referenced by stm32x_auto_probe().
|
static |
Definition at line 650 of file stm32f2x.c.
References bank, ERROR_COMMAND_ARGUMENT_INVALID, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_DEBUG, LOG_ERROR, stm32x_flash_bank::option_bytes, stm32x_options::protection, target::state, stm32x_is_otp(), stm32x_otp_protect(), stm32x_read_options(), stm32x_write_options(), and TARGET_HALTED.
|
static |
Definition at line 559 of file stm32f2x.c.
References bank, ERROR_OK, flash_sector::is_protected, LOG_DEBUG, stm32x_flash_bank::option_bytes, stm32x_options::protection, stm32x_is_otp(), stm32x_otp_read_protect(), and stm32x_read_options().
|
static |
Definition at line 380 of file stm32f2x.c.
References bank, stm32x_options::boot_addr, ERROR_OK, stm32x_flash_bank::has_boot_addr, stm32x_flash_bank::has_extra_options, stm32x_flash_bank::has_large_mem, stm32x_flash_bank::has_optcr2_pcrop, LOG_INFO, NULL, stm32x_options::optcr2_pcrop, OPTCR2_PCROP_RDP, stm32x_flash_bank::option_bytes, stm32x_options::protection, stm32x_flash_bank::protection_bits, stm32x_options::RDP, STM32_FLASH_OPTCR, STM32_FLASH_OPTCR1, STM32_FLASH_OPTCR2, target_read_u32(), and stm32x_options::user_options.
Referenced by COMMAND_HANDLER(), stm32x_protect(), and stm32x_protect_check().
|
static |
Definition at line 348 of file stm32f2x.c.
References ctrl, ERROR_OK, ERROR_TARGET_FAILURE, LOG_ERROR, OPTCR_LOCK, OPTKEY1, OPTKEY2, STM32_FLASH_OPTCR, STM32_FLASH_OPTKEYR, target_read_u32(), and target_write_u32().
Referenced by stm32x_write_options().
|
static |
Definition at line 313 of file stm32f2x.c.
References ctrl, ERROR_OK, ERROR_TARGET_FAILURE, FLASH_LOCK, KEY1, KEY2, LOG_ERROR, STM32_FLASH_CR, STM32_FLASH_KEYR, target_read_u32(), and target_write_u32().
Referenced by stm32x_erase(), stm32x_mass_erase(), and stm32x_write().
|
static |
Definition at line 273 of file stm32f2x.c.
References alive_sleep(), bank, ERROR_FAIL, ERROR_OK, FLASH_BSY, FLASH_ERROR, FLASH_WRPERR, LOG_DEBUG, LOG_ERROR, status, STM32_FLASH_SR, stm32x_get_flash_reg(), stm32x_get_flash_status(), and target_write_u32().
Referenced by stm32x_erase(), stm32x_mass_erase(), stm32x_write(), and stm32x_write_options().
|
static |
Definition at line 787 of file stm32f2x.c.
References bank, buffer, count, ERROR_FLASH_DST_BREAKS_ALIGNMENT, ERROR_OK, ERROR_TARGET_NOT_HALTED, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, FLASH_LOCK, FLASH_PG, FLASH_PSIZE_16, FLASH_PSIZE_8, FLASH_WRITE_TIMEOUT, LOG_ERROR, LOG_WARNING, offset, STM32_FLASH_CR, stm32x_get_flash_reg(), stm32x_unlock_reg(), stm32x_wait_status_busy(), stm32x_write_block(), TARGET_HALTED, target_write_memory(), target_write_u32(), and target_write_u8().
|
static |
Definition at line 689 of file stm32f2x.c.
References working_area::address, ARM_MODE_THREAD, ARMV7M_COMMON_MAGIC, bank, buf_get_u32(), buf_set_u32(), buffer, armv7m_algorithm::common_magic, armv7m_algorithm::core_mode, count, destroy_reg_param(), ERROR_FAIL, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, FLASH_ERROR, FLASH_WRPERR, init_reg_param(), LOG_ERROR, LOG_WARNING, NULL, offset, PARAM_IN_OUT, PARAM_OUT, source, STM32_FLASH_BASE, STM32_FLASH_SR, stm32x_is_otp(), stm32x_is_otp_unlocked(), target_alloc_working_area(), target_alloc_working_area_try(), target_free_working_area(), target_run_flash_async_algorithm(), target_write_buffer(), and target_write_u32().
Referenced by stm32x_write().
|
static |
Definition at line 441 of file stm32f2x.c.
References bank, stm32x_options::boot_addr, ERROR_OK, FLASH_MASS_ERASE_TIMEOUT, stm32x_flash_bank::has_boot_addr, stm32x_flash_bank::has_extra_options, stm32x_flash_bank::has_large_mem, stm32x_flash_bank::has_optcr2_pcrop, NULL, stm32x_options::optcr2_pcrop, OPTCR_LOCK, OPTCR_START, stm32x_flash_bank::option_bytes, stm32x_options::protection, stm32x_flash_bank::protection_bits, stm32x_options::RDP, STM32_FLASH_OPTCR, STM32_FLASH_OPTCR1, STM32_FLASH_OPTCR2, stm32x_unlock_option_reg(), stm32x_wait_status_busy(), target_write_u32(), and stm32x_options::user_options.
Referenced by COMMAND_HANDLER(), and stm32x_protect().
|
static |
Definition at line 1710 of file stm32f2x.c.
|
static |
Definition at line 1710 of file stm32f2x.c.
const struct flash_driver stm32f2x_flash |
Definition at line 1710 of file stm32f2x.c.