PebbleOS v4.47.0-757-g12b6c531f
Loading...
Searching...
No Matches
STM32 QUADSPI

SPI memory driver for the STM32 QUADSPI controller. More...

Data Structures

struct  pbl_spi_mem_stm32_qspi
 STM32 QUADSPI controller. More...
 

Macros

#define PBL_SPI_MEM_STM32_QSPI_DEFINE(sym, _name, _base, _clk, _pinctrl, _max_freq_hz, _dual_flash)
 Define an STM32 QUADSPI controller.
 

Detailed Description

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.

PBL_SPI_MEM_STM32_QSPI_DEFINE(s_qspi, "qspi", 0x52005000,
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

Data Structure Documentation

◆ 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.

Macro Definition Documentation

◆ PBL_SPI_MEM_STM32_QSPI_DEFINE

#define PBL_SPI_MEM_STM32_QSPI_DEFINE (   sym,
  _name,
  _base,
  _clk,
  _pinctrl,
  _max_freq_hz,
  _dual_flash 
)
Value:
PBL_DEVICE_INSTANCE(sym, struct pbl_spi_mem_stm32_qspi, struct pbl_spi_mem, mem) { \
.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
symSymbol of the controller.
_nameName.
_baseRegisters.
_clkKernel clock, from PBL_CLK().
_pinctrlDefault pin control state.
_max_freq_hzHighest frequency of the memory, in Hz.
_dual_flashWhether two memories, one on each bank, take every other byte.