SPI memory driver for the STM32 QUADSPI controller.
More...
SPI memory driver for the STM32 QUADSPI controller.
Operations run in indirect mode, polled, on the memory of bank 1, with the controller clock divided down to the frequency of the memory and sampling half a cycle late. The controller does not map the memory.
50000000);
#define STM32H7_CLK_QUADSPI_CK
QUADSPI kernel clock.
Definition stm32h7.h:110
#define STM32H7_RCC
Clock controller.
Definition stm32h7.h:33
#define PBL_CLK(_ctrl, _id)
Initializer for a struct pbl_clk.
Definition clk.h:132
#define PBL_SPI_MEM_STM32_QSPI_DEFINE(sym, _name, _base, _clk, _pinctrl, _max_freq_hz, _dual_flash)
Define an STM32 QUADSPI controller.
Definition stm32_qspi.h:60
◆ pbl_spi_mem_stm32_qspi
| struct pbl_spi_mem_stm32_qspi |
STM32 QUADSPI controller.
| Data Fields |
|
uintptr_t |
base |
Registers. |
|
struct pbl_clk |
clk |
Kernel clock. |
|
bool |
dual_flash |
Whether two memories, one on each bank, take every other byte. |
|
uint32_t |
max_freq_hz |
Highest frequency of the memory, in Hz. |
|
struct pbl_spi_mem |
mem |
SPI memory controller. |
|
struct pbl_pinctrl |
pinctrl |
Pins. |
◆ PBL_SPI_MEM_STM32_QSPI_DEFINE
| #define PBL_SPI_MEM_STM32_QSPI_DEFINE |
( |
|
sym, |
|
|
|
_name, |
|
|
|
_base, |
|
|
|
_clk, |
|
|
|
_pinctrl, |
|
|
|
_max_freq_hz, |
|
|
|
_dual_flash |
|
) |
| |
Value:
.mem =
PBL_SPI_MEM_INIT(sym, _name,
nullptr, &pbl_spi_mem_stm32_qspi_ops, 0U), \
.base = (_base), .clk = _clk, .pinctrl =
PBL_PINCTRL(_pinctrl,
nullptr, 0), \
.max_freq_hz = (_max_freq_hz), .dual_flash = (_dual_flash), \
}
#define PBL_PINCTRL(_default, _sleep, _reg)
Initializer for a struct pbl_pinctrl.
Definition pinctrl.h:132
STM32 QUADSPI controller.
Definition stm32_qspi.h:30
A SPI memory controller.
Definition spi_mem.h:239
#define PBL_SPI_MEM_STATE_DEFINE(sym)
Define the class state of controller sym, for the PBL_SPI_MEM_*_DEFINE() macro of a driver.
Definition spi_mem.h:256
#define PBL_SPI_MEM_INIT(sym, _name, _parent, _ops, _flags)
Initializer for the struct pbl_spi_mem of controller sym.
Definition spi_mem.h:270
Define an STM32 QUADSPI controller.
- Parameters
-
| sym | Symbol of the controller. |
| _name | Name. |
| _base | Registers. |
| _clk | Kernel clock, from PBL_CLK(). |
| _pinctrl | Default pin control state. |
| _max_freq_hz | Highest frequency of the memory, in Hz. |
| _dual_flash | Whether two memories, one on each bank, take every other byte. |