OpenOCD
stm32h7x.c File Reference
Include dependency graph for stm32h7x.c:

Go to the source code of this file.

Data Structures

struct  stm32h7_flash_bank
 
struct  stm32h7_part_info
 
struct  stm32h7_rev
 

Macros

#define DBGMCU_IDCODE_REGISTER   0x5C001000
 
#define DEVID_STM32H72_H73XX   0x483
 
#define DEVID_STM32H74_H75XX   0x450
 
#define DEVID_STM32H7A_H7BXX   0x480
 
#define DEVID_STM32H7R_H7SXX   0x485
 
#define FLASH_BANK0_ADDRESS   0x08000000
 
#define FLASH_BANK1_ADDRESS   0x08100000
 
#define FLASH_BER   BIT(3)
 
#define FLASH_BSY   BIT(0) /* Operation in progress */
 
#define FLASH_CRCENDF   BIT(27) /* CRC end flag */
 
#define FLASH_CRCRDERRF   BIT(28) /* CRC read error flag */
 
#define FLASH_DBECCERR   BIT(26) /* Double ECC error */
 
#define FLASH_DBECCERRF   BIT(26) /* ECC double error flag */
 
#define FLASH_EOPF   BIT(16) /* End-of-program flag */
 
#define FLASH_ERASE_TIMEOUT   10000
 
#define FLASH_ERROR
 
#define FLASH_ERROR_H7RS
 
#define FLASH_FW   BIT(6)
 
#define FLASH_INCERR   BIT(21) /* Inconsistency error */
 
#define FLASH_INCERRF   BIT(21) /* Inconsistency error flag */
 
#define FLASH_LOCK   BIT(0)
 
#define FLASH_OBLERRF   BIT(20) /* Option byte loading error flag */
 
#define FLASH_OPERR   BIT(22) /* Operation error */
 
#define FLASH_PG   BIT(1)
 
#define FLASH_PGSERR   BIT(18) /* Programming sequence error */
 
#define FLASH_PGSERRF   BIT(18) /* Programming sequence error flag */
 
#define FLASH_PSIZE_16   (1 << 4)
 
#define FLASH_PSIZE_32   (2 << 4)
 
#define FLASH_PSIZE_64   (3 << 4)
 
#define FLASH_PSIZE_8   (0 << 4)
 
#define FLASH_QW   BIT(2) /* Operation queue in progress */
 
#define FLASH_RDPERR   BIT(23) /* Read Protection error */
 
#define FLASH_RDSERR   BIT(24) /* Secure Protection error */
 
#define FLASH_RDSERRF   BIT(24) /* Read security error flag */
 
#define FLASH_REG_BASE_B0   0x52002000
 
#define FLASH_REG_BASE_B1   0x52002100
 
#define FLASH_SER   BIT(2)
 
#define FLASH_SNECCERR   BIT(25) /* Single ECC error */
 
#define FLASH_SNECCERRF   BIT(25) /* ECC single error flag */
 
#define FLASH_START   BIT(7)
 
#define FLASH_STRBERR   BIT(19) /* Strobe error */
 
#define FLASH_STRBERRF   BIT(19) /* Strobe error flag */
 
#define FLASH_WRITE_TIMEOUT   5
 
#define FLASH_WRPERR   BIT(17) /* Write protection error */
 
#define FLASH_WRPERRF   BIT(17) /* Write protection error flag */
 
#define KEY1   0x45670123
 
#define KEY2   0xCDEF89AB
 
#define MASS_ERASE_TIMEOUT   30000
 
#define OPT_BSY   BIT(0)
 
#define OPT_CLR_OPTCHANGEERR   BIT(30)
 
#define OPT_LOCK   BIT(0)
 
#define OPT_OPTCHANGEERR   BIT(30)
 
#define OPT_RDP_MASK   (0xff << OPT_RDP_POS)
 
#define OPT_RDP_POS   8
 
#define OPT_START   BIT(1)
 
#define OPTKEY1   0x08192A3B
 
#define OPTKEY2   0x4C5D6E7F
 

Enumerations

enum  stm32h7_flash_reg_index {
  STM32_FLASH_ACR_INDEX , STM32_FLASH_KEYR_INDEX , STM32_FLASH_OPTKEYR_INDEX , STM32_FLASH_SR_INDEX ,
  STM32_FLASH_CR_INDEX , STM32_FLASH_ICR_CCR_INDEX , STM32_FLASH_OPTCR_INDEX , STM32_FLASH_OPTSR_INDEX ,
  STM32_FLASH_OPTSR_CUR_INDEX , STM32_FLASH_OPTSR_PRG_INDEX , STM32_FLASH_OPTCCR_INDEX , STM32_FLASH_WPSN_CUR_INDEX ,
  STM32_FLASH_WPSN_PRG_INDEX , STM32_FLASH_ISR_INDEX , STM32_FLASH_REG_INDEX_NUM
}
 
enum  stm32h7_opt_rdp { OPT_RDP_L0 = 0xaa , OPT_RDP_L1 = 0x00 , OPT_RDP_L2 = 0xcc }
 

Functions

 COMMAND_HANDLER (stm32h7_handle_lock_command)
 
 COMMAND_HANDLER (stm32h7_handle_mass_erase_command)
 
 COMMAND_HANDLER (stm32h7_handle_option_read_command)
 
 COMMAND_HANDLER (stm32h7_handle_option_write_command)
 
 COMMAND_HANDLER (stm32h7_handle_unlock_command)
 
 FLASH_BANK_COMMAND_HANDLER (stm32h7_flash_bank_command)
 
static uint32_t stm32h74_h75xx_compute_flash_cr (uint32_t cmd, int snb)
 
static int stm32h7_auto_probe (struct flash_bank *bank)
 
static int stm32h7_erase (struct flash_bank *bank, unsigned int first, unsigned int last)
 
static uint32_t stm32h7_get_flash_reg (struct flash_bank *bank, uint32_t reg_offset)
 
static int stm32h7_get_flash_status (struct flash_bank *bank, uint32_t *status)
 
static int stm32h7_get_info (struct flash_bank *bank, struct command_invocation *cmd)
 
static int stm32h7_lock_option_reg (struct flash_bank *bank)
 
static int stm32h7_lock_reg (struct flash_bank *bank)
 
static int stm32h7_mass_erase (struct flash_bank *bank)
 
static int stm32h7_modify_option (struct flash_bank *bank, uint32_t reg_offset, uint32_t value, uint32_t mask)
 
static int stm32h7_probe (struct flash_bank *bank)
 
static int stm32h7_protect (struct flash_bank *bank, int set, unsigned int first, unsigned int last)
 
static int stm32h7_protect_check (struct flash_bank *bank)
 
static int stm32h7_read_flash_reg (struct flash_bank *bank, uint32_t reg_offset, uint32_t *value)
 
static int stm32h7_read_flash_reg_by_index (struct flash_bank *bank, enum stm32h7_flash_reg_index reg_index, uint32_t *value)
 
static int stm32h7_read_id_code (struct flash_bank *bank, uint32_t *id)
 
static int stm32h7_set_rdp (struct flash_bank *bank, enum stm32h7_opt_rdp new_rdp)
 
static int stm32h7_unlock_option_reg (struct flash_bank *bank)
 
static int stm32h7_unlock_reg (struct flash_bank *bank)
 
static int stm32h7_wait_flash_op_queue (struct flash_bank *bank, int timeout)
 
static int stm32h7_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
 
static int stm32h7_write_block (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
 
static int stm32h7_write_flash_reg (struct flash_bank *bank, uint32_t reg_offset, uint32_t value)
 
static int stm32h7_write_flash_reg_by_index (struct flash_bank *bank, enum stm32h7_flash_reg_index reg_index, uint32_t value)
 
static int stm32h7_write_option (struct flash_bank *bank, uint32_t reg_offset, uint32_t value)
 
static uint32_t stm32h7a_h7b_h7r_h7sxx_compute_flash_cr (uint32_t cmd, int snb)
 
static int stm32h7rs_get_flash_status (struct flash_bank *bank, uint32_t *status)
 

Variables

static const struct stm32h7_rev stm32h72_h73xx_revs []
 
static const struct stm32h7_rev stm32h74_h75xx_revs []
 
static const struct command_registration stm32h7_command_handlers []
 
static const struct command_registration stm32h7_exec_command_handlers []
 
static const uint32_t stm32h7_flash_regs [STM32_FLASH_REG_INDEX_NUM]
 
static const uint8_t stm32h7_flash_write_code []
 
static const struct stm32h7_part_info stm32h7_parts []
 
static const struct stm32h7_rev stm32h7a_h7bxx_revs []
 
static const struct stm32h7_rev stm32h7r_h7sxx_revs []
 
static const uint32_t stm32h7rs_flash_regs [STM32_FLASH_REG_INDEX_NUM]
 
static const uint8_t stm32h7rs_flash_write_code []
 
const struct flash_driver stm32h7x_flash
 

Macro Definition Documentation

◆ DBGMCU_IDCODE_REGISTER

#define DBGMCU_IDCODE_REGISTER   0x5C001000

Definition at line 142 of file stm32h7x.c.

◆ DEVID_STM32H72_H73XX

#define DEVID_STM32H72_H73XX   0x483

Definition at line 151 of file stm32h7x.c.

◆ DEVID_STM32H74_H75XX

#define DEVID_STM32H74_H75XX   0x450

Definition at line 149 of file stm32h7x.c.

◆ DEVID_STM32H7A_H7BXX

#define DEVID_STM32H7A_H7BXX   0x480

Definition at line 150 of file stm32h7x.c.

◆ DEVID_STM32H7R_H7SXX

#define DEVID_STM32H7R_H7SXX   0x485

Definition at line 152 of file stm32h7x.c.

◆ FLASH_BANK0_ADDRESS

#define FLASH_BANK0_ADDRESS   0x08000000

Definition at line 143 of file stm32h7x.c.

◆ FLASH_BANK1_ADDRESS

#define FLASH_BANK1_ADDRESS   0x08100000

Definition at line 144 of file stm32h7x.c.

◆ FLASH_BER

#define FLASH_BER   BIT(3)

Definition at line 81 of file stm32h7x.c.

◆ FLASH_BSY

#define FLASH_BSY   BIT(0) /* Operation in progress */

Definition at line 103 of file stm32h7x.c.

◆ FLASH_CRCENDF

#define FLASH_CRCENDF   BIT(27) /* CRC end flag */

Definition at line 91 of file stm32h7x.c.

◆ FLASH_CRCRDERRF

#define FLASH_CRCRDERRF   BIT(28) /* CRC read error flag */

Definition at line 90 of file stm32h7x.c.

◆ FLASH_DBECCERR

#define FLASH_DBECCERR   BIT(26) /* Double ECC error */

Definition at line 113 of file stm32h7x.c.

◆ FLASH_DBECCERRF

#define FLASH_DBECCERRF   BIT(26) /* ECC double error flag */

Definition at line 92 of file stm32h7x.c.

◆ FLASH_EOPF

#define FLASH_EOPF   BIT(16) /* End-of-program flag */

Definition at line 100 of file stm32h7x.c.

◆ FLASH_ERASE_TIMEOUT

#define FLASH_ERASE_TIMEOUT   10000

Definition at line 17 of file stm32h7x.c.

◆ FLASH_ERROR

#define FLASH_ERROR
Value:
#define FLASH_OPERR
Definition: stm32h7x.c:109
#define FLASH_INCERR
Definition: stm32h7x.c:108
#define FLASH_RDSERR
Definition: stm32h7x.c:111
#define FLASH_WRPERR
Definition: stm32h7x.c:105
#define FLASH_STRBERR
Definition: stm32h7x.c:107
#define FLASH_DBECCERR
Definition: stm32h7x.c:113
#define FLASH_PGSERR
Definition: stm32h7x.c:106
#define FLASH_SNECCERR
Definition: stm32h7x.c:112

Definition at line 115 of file stm32h7x.c.

◆ FLASH_ERROR_H7RS

#define FLASH_ERROR_H7RS
Value:
#define FLASH_STRBERRF
Definition: stm32h7x.c:97
#define FLASH_CRCRDERRF
Definition: stm32h7x.c:90
#define FLASH_EOPF
Definition: stm32h7x.c:100
#define FLASH_DBECCERRF
Definition: stm32h7x.c:92
#define FLASH_WRPERRF
Definition: stm32h7x.c:99
#define FLASH_RDSERRF
Definition: stm32h7x.c:94
#define FLASH_PGSERRF
Definition: stm32h7x.c:98
#define FLASH_CRCENDF
Definition: stm32h7x.c:91
#define FLASH_SNECCERRF
Definition: stm32h7x.c:93
#define FLASH_OBLERRF
Definition: stm32h7x.c:96

Definition at line 118 of file stm32h7x.c.

◆ FLASH_FW

#define FLASH_FW   BIT(6)

Definition at line 86 of file stm32h7x.c.

◆ FLASH_INCERR

#define FLASH_INCERR   BIT(21) /* Inconsistency error */

Definition at line 108 of file stm32h7x.c.

◆ FLASH_INCERRF

#define FLASH_INCERRF   BIT(21) /* Inconsistency error flag */

Definition at line 95 of file stm32h7x.c.

◆ FLASH_LOCK

#define FLASH_LOCK   BIT(0)

Definition at line 78 of file stm32h7x.c.

◆ FLASH_OBLERRF

#define FLASH_OBLERRF   BIT(20) /* Option byte loading error flag */

Definition at line 96 of file stm32h7x.c.

◆ FLASH_OPERR

#define FLASH_OPERR   BIT(22) /* Operation error */

Definition at line 109 of file stm32h7x.c.

◆ FLASH_PG

#define FLASH_PG   BIT(1)

Definition at line 79 of file stm32h7x.c.

◆ FLASH_PGSERR

#define FLASH_PGSERR   BIT(18) /* Programming sequence error */

Definition at line 106 of file stm32h7x.c.

◆ FLASH_PGSERRF

#define FLASH_PGSERRF   BIT(18) /* Programming sequence error flag */

Definition at line 98 of file stm32h7x.c.

◆ FLASH_PSIZE_16

#define FLASH_PSIZE_16   (1 << 4)

Definition at line 83 of file stm32h7x.c.

◆ FLASH_PSIZE_32

#define FLASH_PSIZE_32   (2 << 4)

Definition at line 84 of file stm32h7x.c.

◆ FLASH_PSIZE_64

#define FLASH_PSIZE_64   (3 << 4)

Definition at line 85 of file stm32h7x.c.

◆ FLASH_PSIZE_8

#define FLASH_PSIZE_8   (0 << 4)

Definition at line 82 of file stm32h7x.c.

◆ FLASH_QW

#define FLASH_QW   BIT(2) /* Operation queue in progress */

Definition at line 104 of file stm32h7x.c.

◆ FLASH_RDPERR

#define FLASH_RDPERR   BIT(23) /* Read Protection error */

Definition at line 110 of file stm32h7x.c.

◆ FLASH_RDSERR

#define FLASH_RDSERR   BIT(24) /* Secure Protection error */

Definition at line 111 of file stm32h7x.c.

◆ FLASH_RDSERRF

#define FLASH_RDSERRF   BIT(24) /* Read security error flag */

Definition at line 94 of file stm32h7x.c.

◆ FLASH_REG_BASE_B0

#define FLASH_REG_BASE_B0   0x52002000

Definition at line 145 of file stm32h7x.c.

◆ FLASH_REG_BASE_B1

#define FLASH_REG_BASE_B1   0x52002100

Definition at line 146 of file stm32h7x.c.

◆ FLASH_SER

#define FLASH_SER   BIT(2)

Definition at line 80 of file stm32h7x.c.

◆ FLASH_SNECCERR

#define FLASH_SNECCERR   BIT(25) /* Single ECC error */

Definition at line 112 of file stm32h7x.c.

◆ FLASH_SNECCERRF

#define FLASH_SNECCERRF   BIT(25) /* ECC single error flag */

Definition at line 93 of file stm32h7x.c.

◆ FLASH_START

#define FLASH_START   BIT(7)

Definition at line 87 of file stm32h7x.c.

◆ FLASH_STRBERR

#define FLASH_STRBERR   BIT(19) /* Strobe error */

Definition at line 107 of file stm32h7x.c.

◆ FLASH_STRBERRF

#define FLASH_STRBERRF   BIT(19) /* Strobe error flag */

Definition at line 97 of file stm32h7x.c.

◆ FLASH_WRITE_TIMEOUT

#define FLASH_WRITE_TIMEOUT   5

Definition at line 18 of file stm32h7x.c.

◆ FLASH_WRPERR

#define FLASH_WRPERR   BIT(17) /* Write protection error */

Definition at line 105 of file stm32h7x.c.

◆ FLASH_WRPERRF

#define FLASH_WRPERRF   BIT(17) /* Write protection error flag */

Definition at line 99 of file stm32h7x.c.

◆ KEY1

#define KEY1   0x45670123

Definition at line 135 of file stm32h7x.c.

◆ KEY2

#define KEY2   0xCDEF89AB

Definition at line 136 of file stm32h7x.c.

◆ MASS_ERASE_TIMEOUT

#define MASS_ERASE_TIMEOUT   30000

Definition at line 19 of file stm32h7x.c.

◆ OPT_BSY

#define OPT_BSY   BIT(0)

Definition at line 126 of file stm32h7x.c.

◆ OPT_CLR_OPTCHANGEERR

#define OPT_CLR_OPTCHANGEERR   BIT(30)

Definition at line 132 of file stm32h7x.c.

◆ OPT_LOCK

#define OPT_LOCK   BIT(0)

Definition at line 122 of file stm32h7x.c.

◆ OPT_OPTCHANGEERR

#define OPT_OPTCHANGEERR   BIT(30)

Definition at line 129 of file stm32h7x.c.

◆ OPT_RDP_MASK

#define OPT_RDP_MASK   (0xff << OPT_RDP_POS)

Definition at line 128 of file stm32h7x.c.

◆ OPT_RDP_POS

#define OPT_RDP_POS   8

Definition at line 127 of file stm32h7x.c.

◆ OPT_START

#define OPT_START   BIT(1)

Definition at line 123 of file stm32h7x.c.

◆ OPTKEY1

#define OPTKEY1   0x08192A3B

Definition at line 139 of file stm32h7x.c.

◆ OPTKEY2

#define OPTKEY2   0x4C5D6E7F

Definition at line 140 of file stm32h7x.c.

Enumeration Type Documentation

◆ stm32h7_flash_reg_index

Enumerator
STM32_FLASH_ACR_INDEX 
STM32_FLASH_KEYR_INDEX 
STM32_FLASH_OPTKEYR_INDEX 
STM32_FLASH_SR_INDEX 
STM32_FLASH_CR_INDEX 
STM32_FLASH_ICR_CCR_INDEX 
STM32_FLASH_OPTCR_INDEX 
STM32_FLASH_OPTSR_INDEX 
STM32_FLASH_OPTSR_CUR_INDEX 
STM32_FLASH_OPTSR_PRG_INDEX 
STM32_FLASH_OPTCCR_INDEX 
STM32_FLASH_WPSN_CUR_INDEX 
STM32_FLASH_WPSN_PRG_INDEX 
STM32_FLASH_ISR_INDEX 
STM32_FLASH_REG_INDEX_NUM 

Definition at line 29 of file stm32h7x.c.

◆ stm32h7_opt_rdp

Enumerator
OPT_RDP_L0 
OPT_RDP_L1 
OPT_RDP_L2 

Definition at line 192 of file stm32h7x.c.

Function Documentation

◆ COMMAND_HANDLER() [1/5]

COMMAND_HANDLER ( stm32h7_handle_lock_command  )

◆ COMMAND_HANDLER() [2/5]

COMMAND_HANDLER ( stm32h7_handle_mass_erase_command  )

◆ COMMAND_HANDLER() [3/5]

COMMAND_HANDLER ( stm32h7_handle_option_read_command  )

◆ COMMAND_HANDLER() [4/5]

COMMAND_HANDLER ( stm32h7_handle_option_write_command  )

◆ COMMAND_HANDLER() [5/5]

COMMAND_HANDLER ( stm32h7_handle_unlock_command  )

◆ FLASH_BANK_COMMAND_HANDLER()

FLASH_BANK_COMMAND_HANDLER ( stm32h7_flash_bank_command  )

◆ stm32h74_h75xx_compute_flash_cr()

static uint32_t stm32h74_h75xx_compute_flash_cr ( uint32_t  cmd,
int  snb 
)
static

Definition at line 214 of file stm32h7x.c.

References cmd.

◆ stm32h7_auto_probe()

static int stm32h7_auto_probe ( struct flash_bank bank)
static

Definition at line 1035 of file stm32h7x.c.

References bank, ERROR_OK, stm32h7_flash_bank::probed, and stm32h7_probe().

◆ stm32h7_erase()

◆ stm32h7_get_flash_reg()

static uint32_t stm32h7_get_flash_reg ( struct flash_bank bank,
uint32_t  reg_offset 
)
inlinestatic

◆ stm32h7_get_flash_status()

static int stm32h7_get_flash_status ( struct flash_bank bank,
uint32_t *  status 
)
static

Definition at line 372 of file stm32h7x.c.

References bank, status, STM32_FLASH_SR_INDEX, and stm32h7_read_flash_reg_by_index().

Referenced by stm32h7_wait_flash_op_queue().

◆ stm32h7_get_info()

◆ stm32h7_lock_option_reg()

static int stm32h7_lock_option_reg ( struct flash_bank bank)
inlinestatic

Definition at line 490 of file stm32h7x.c.

References bank, OPT_LOCK, STM32_FLASH_OPTCR_INDEX, and stm32h7_write_flash_reg_by_index().

Referenced by stm32h7_write_option().

◆ stm32h7_lock_reg()

static int stm32h7_lock_reg ( struct flash_bank bank)
inlinestatic

◆ stm32h7_mass_erase()

◆ stm32h7_modify_option()

static int stm32h7_modify_option ( struct flash_bank bank,
uint32_t  reg_offset,
uint32_t  value,
uint32_t  mask 
)
static

Definition at line 553 of file stm32h7x.c.

References bank, ERROR_OK, mask, stm32h7_read_flash_reg_by_index(), and stm32h7_write_option().

Referenced by COMMAND_HANDLER().

◆ stm32h7_probe()

◆ stm32h7_protect()

static int stm32h7_protect ( struct flash_bank bank,
int  set,
unsigned int  first,
unsigned int  last 
)
static

◆ stm32h7_protect_check()

static int stm32h7_protect_check ( struct flash_bank bank)
static

◆ stm32h7_read_flash_reg()

static int stm32h7_read_flash_reg ( struct flash_bank bank,
uint32_t  reg_offset,
uint32_t *  value 
)
static

Definition at line 336 of file stm32h7x.c.

References bank, ERROR_OK, LOG_ERROR, stm32h7_get_flash_reg(), and target_read_u32().

Referenced by stm32h7_read_flash_reg_by_index().

◆ stm32h7_read_flash_reg_by_index()

◆ stm32h7_read_id_code()

static int stm32h7_read_id_code ( struct flash_bank bank,
uint32_t *  id 
)
static

Definition at line 857 of file stm32h7x.c.

References bank, DBGMCU_IDCODE_REGISTER, ERROR_OK, and target_read_u32().

Referenced by stm32h7_probe().

◆ stm32h7_set_rdp()

◆ stm32h7_unlock_option_reg()

◆ stm32h7_unlock_reg()

◆ stm32h7_wait_flash_op_queue()

◆ stm32h7_write()

◆ stm32h7_write_block()

◆ stm32h7_write_flash_reg()

static int stm32h7_write_flash_reg ( struct flash_bank bank,
uint32_t  reg_offset,
uint32_t  value 
)
static

◆ stm32h7_write_flash_reg_by_index()

◆ stm32h7_write_option()

◆ stm32h7a_h7b_h7r_h7sxx_compute_flash_cr()

static uint32_t stm32h7a_h7b_h7r_h7sxx_compute_flash_cr ( uint32_t  cmd,
int  snb 
)
static

Definition at line 219 of file stm32h7x.c.

References cmd, FLASH_FW, FLASH_PSIZE_64, and FLASH_START.

◆ stm32h7rs_get_flash_status()

static int stm32h7rs_get_flash_status ( struct flash_bank bank,
uint32_t *  status 
)
static

Definition at line 377 of file stm32h7x.c.

References bank, status, STM32_FLASH_ISR_INDEX, and stm32h7_read_flash_reg_by_index().

Variable Documentation

◆ stm32h72_h73xx_revs

const struct stm32h7_rev stm32h72_h73xx_revs[]
static
Initial value:
= {
{ 0x1000, "A" }, { 0x1001, "Z" },
}

Definition at line 65 of file stm32h7x.c.

◆ stm32h74_h75xx_revs

const struct stm32h7_rev stm32h74_h75xx_revs[]
static
Initial value:
= {
{ 0x1000, "A" }, { 0x1001, "Z" }, { 0x1003, "Y" }, { 0x2001, "X" }, { 0x2003, "V" },
}

Definition at line 65 of file stm32h7x.c.

◆ stm32h7_command_handlers

const struct command_registration stm32h7_command_handlers[]
static
Initial value:
= {
{
.name = "stm32h7x",
.mode = COMMAND_ANY,
.help = "stm32h7x flash command group",
.usage = "",
},
}
#define COMMAND_REGISTRATION_DONE
Use this as the last entry in an array of command_registration records.
Definition: command.h:251
@ COMMAND_ANY
Definition: command.h:42
static const struct command_registration stm32h7_exec_command_handlers[]
Definition: stm32h7x.c:1266

Definition at line 1246 of file stm32h7x.c.

◆ stm32h7_exec_command_handlers

const struct command_registration stm32h7_exec_command_handlers[]
static

Definition at line 1246 of file stm32h7x.c.

◆ stm32h7_flash_regs

const uint32_t stm32h7_flash_regs[STM32_FLASH_REG_INDEX_NUM]
static
Initial value:
= {
}
@ STM32_FLASH_SR_INDEX
Definition: stm32h7x.c:33
@ STM32_FLASH_OPTCR_INDEX
Definition: stm32h7x.c:36
@ STM32_FLASH_OPTSR_CUR_INDEX
Definition: stm32h7x.c:38
@ STM32_FLASH_OPTSR_PRG_INDEX
Definition: stm32h7x.c:39
@ STM32_FLASH_ACR_INDEX
Definition: stm32h7x.c:30
@ STM32_FLASH_OPTCCR_INDEX
Definition: stm32h7x.c:40
@ STM32_FLASH_WPSN_PRG_INDEX
Definition: stm32h7x.c:42
@ STM32_FLASH_CR_INDEX
Definition: stm32h7x.c:34
@ STM32_FLASH_OPTKEYR_INDEX
Definition: stm32h7x.c:32
@ STM32_FLASH_KEYR_INDEX
Definition: stm32h7x.c:31
@ STM32_FLASH_ICR_CCR_INDEX
Definition: stm32h7x.c:35
@ STM32_FLASH_WPSN_CUR_INDEX
Definition: stm32h7x.c:41

Definition at line 50 of file stm32h7x.c.

Referenced by stm32h7_probe().

◆ stm32h7_flash_write_code

const uint8_t stm32h7_flash_write_code[]
static
Initial value:
= {
}

Definition at line 21 of file stm32h7x.c.

◆ stm32h7_parts

const struct stm32h7_part_info stm32h7_parts[]
static

Definition at line 231 of file stm32h7x.c.

Referenced by stm32h7_probe().

◆ stm32h7a_h7bxx_revs

const struct stm32h7_rev stm32h7a_h7bxx_revs[]
static
Initial value:
= {
{ 0x1000, "A"},
}

Definition at line 65 of file stm32h7x.c.

◆ stm32h7r_h7sxx_revs

const struct stm32h7_rev stm32h7r_h7sxx_revs[]
static
Initial value:
= {
{ 0x1000, "A" }, { 0x2000, "B" },
}

Definition at line 65 of file stm32h7x.c.

◆ stm32h7rs_flash_regs

const uint32_t stm32h7rs_flash_regs[STM32_FLASH_REG_INDEX_NUM]
static
Initial value:
= {
}
@ STM32_FLASH_OPTSR_INDEX
Definition: stm32h7x.c:37
@ STM32_FLASH_ISR_INDEX
Definition: stm32h7x.c:43

Definition at line 65 of file stm32h7x.c.

Referenced by stm32h7_probe().

◆ stm32h7rs_flash_write_code

const uint8_t stm32h7rs_flash_write_code[]
static
Initial value:
= {
}

Definition at line 25 of file stm32h7x.c.

◆ stm32h7x_flash

const struct flash_driver stm32h7x_flash
Initial value:
= {
.name = "stm32h7x",
.flash_bank_command = stm32h7_flash_bank_command,
.erase = stm32h7_erase,
.protect = stm32h7_protect,
.write = stm32h7_write,
.probe = stm32h7_probe,
.auto_probe = stm32h7_auto_probe,
.erase_check = default_flash_blank_check,
.protect_check = stm32h7_protect_check,
.free_driver_priv = default_flash_free_driver_priv,
}
int default_flash_blank_check(struct flash_bank *bank)
Provides default erased-bank check handling.
int default_flash_read(struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count)
Provides default read implementation for flash memory.
void default_flash_free_driver_priv(struct flash_bank *bank)
Deallocates bank->driver_priv.
static int stm32h7_protect_check(struct flash_bank *bank)
Definition: stm32h7x.c:566
static int stm32h7_probe(struct flash_bank *bank)
Definition: stm32h7x.c:866
static const struct command_registration stm32h7_command_handlers[]
Definition: stm32h7x.c:1305
static int stm32h7_get_info(struct flash_bank *bank, struct command_invocation *cmd)
Definition: stm32h7x.c:1046
static int stm32h7_protect(struct flash_bank *bank, int set, unsigned int first, unsigned int last)
Definition: stm32h7x.c:639
static int stm32h7_write(struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
Definition: stm32h7x.c:778
static int stm32h7_erase(struct flash_bank *bank, unsigned int first, unsigned int last)
Definition: stm32h7x.c:583
static int stm32h7_auto_probe(struct flash_bank *bank)
Definition: stm32h7x.c:1035

Definition at line 1246 of file stm32h7x.c.