Zephyr Project API 4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Extended operations for STM32 flash controllers. More...

Files

file  stm32_flash_api_extensions.h
 Header file for STM32 flash extended operations.
 

Data Structures

struct  flash_stm32_ex_op_sector_wp_in
 Input structure for FLASH_STM32_EX_OP_SECTOR_WP operation. More...
 
struct  flash_stm32_ex_op_sector_wp_out
 Output structure for FLASH_STM32_EX_OP_SECTOR_WP operation. More...
 
struct  flash_stm32_ex_op_rdp
 Input structure for FLASH_STM32_EX_OP_RDP operation. More...
 

Enumerations

enum  stm32_ex_ops {
  FLASH_STM32_EX_OP_SECTOR_WP = FLASH_EX_OP_VENDOR_BASE , FLASH_STM32_EX_OP_RDP , FLASH_STM32_EX_OP_BLOCK_OPTION_REG , FLASH_STM32_EX_OP_BLOCK_CONTROL_REG ,
  FLASH_STM32_EX_OP_OPTB_READ , FLASH_STM32_EX_OP_OPTB_WRITE
}
 Enumeration for STM32 flash extended operations. More...
 
enum  stm32_qspi_ex_ops { FLASH_STM32_QSPI_EX_OP_GENERIC_READ , FLASH_STM32_QSPI_EX_OP_GENERIC_WRITE }
 Enumeration for STM32 QSPI extended operations. More...
 

Detailed Description

Extended operations for STM32 flash controllers.

Enumeration Type Documentation

◆ stm32_ex_ops

#include <include/zephyr/drivers/flash/stm32_flash_api_extensions.h>

Enumeration for STM32 flash extended operations.

Enumerator
FLASH_STM32_EX_OP_SECTOR_WP 

STM32 sector write protection control.

Attention
Available only when the following Kconfig option is enabled:
CONFIG_FLASH_STM32_WRITE_PROTECT 
.

As an input, this operation takes a flash_stm32_ex_op_sector_wp_in with two sector masks: first mask is used to enable protection on sectors, while second mask is used to do the opposite. If both masks are 0, then protection will remain unchanged. If same sector is set on both masks, protection will be enabled.

As an output, sector mask with enabled protection is returned. Input can be NULL if we only want to get protected sectors. Output can be NULL if not needed.

FLASH_STM32_EX_OP_RDP 

STM32 sector readout protection control.

Attention
Available only when the following Kconfig option is enabled:
CONFIG_FLASH_STM32_READOUT_PROTECTION 
.

As an input, this operation takes a flash_stm32_ex_op_rdp with information about desired RDP state. As an output, the status after applying changes is returned.

FLASH_STM32_EX_OP_BLOCK_OPTION_REG 

STM32 block option register.

This operation causes option register to be locked until next boot. After calling, it's not possible to change option bytes (WP, RDP, user bytes).

FLASH_STM32_EX_OP_BLOCK_CONTROL_REG 

STM32 block control register.

This operation causes control register to be locked until next boot. After calling, it's not possible to perform basic operation like erasing or writing.

FLASH_STM32_EX_OP_OPTB_READ 

STM32 option bytes read.

Read the option bytes content, out takes a *uint32_t, in is unused.

FLASH_STM32_EX_OP_OPTB_WRITE 

STM32 option bytes write.

Write the option bytes content, in takes the new value, out is unused. Note that the new value only takes effect after the device is restarted.

◆ stm32_qspi_ex_ops

#include <include/zephyr/drivers/flash/stm32_flash_api_extensions.h>

Enumeration for STM32 QSPI extended operations.

Enumerator
FLASH_STM32_QSPI_EX_OP_GENERIC_READ 

QSPI generic read command.

Transmit the custom command and read the result to the user-provided buffer.

FLASH_STM32_QSPI_EX_OP_GENERIC_WRITE 

QSPI generic write command.

Transmit the custom command and then write data taken from the user-provided buffer.