|
PebbleOS v4.44.0-46-gef116268a
|
SPI memory controller driver for the SF32LB52 MPI in NOR mode. More...
Data Structures | |
| struct | pbl_spi_mem_sf32lb52_mpi |
| SF32LB52 MPI controller. More... | |
Macros | |
| #define | PBL_SPI_MEM_SF32LB52_MPI_DEFINE(sym, _name, _idx, _mem_size, _clk, _flags, _deps) |
| Define an SF32LB52 MPI controller. | |
SPI memory controller driver for the SF32LB52 MPI in NOR mode.
Operations go through the command registers and the 64-byte FIFO: read data comes back through it, and write data is pushed to it byte by byte once the command is issued, so that it only ever holds the bytes the command takes. The memory-mapped window is the read window, programmed with the read operation the memory driver picks.
With PBL_SPI_MEM_XIP, the CPU executes from the memory: the boot code's clock, prescaler and sampling setup are kept, the clock is never gated, and everything that runs while the memory is unreadable (status polling, window changes, power down) runs from RAM with interrupts disabled.
| struct pbl_spi_mem_sf32lb52_mpi |
SF32LB52 MPI controller.
| Data Fields | ||
|---|---|---|
| struct pbl_clk | clk | Clock. |
| uint8_t | idx | Instance, 1 or 2. |
| struct pbl_spi_mem | mem | Controller. |
| uint32_t | mem_size | Memory-mapped window size, in bytes. |
| #define PBL_SPI_MEM_SF32LB52_MPI_DEFINE | ( | sym, | |
| _name, | |||
| _idx, | |||
| _mem_size, | |||
| _clk, | |||
| _flags, | |||
| _deps | |||
| ) |
Define an SF32LB52 MPI controller.
| sym | Symbol of the controller. |
| _name | Name. |
| _idx | Instance, 1 or 2. |
| _mem_size | Memory-mapped window size, in bytes. |
| _clk | Clock, from PBL_CLK(). |
| _flags | Flags, PBL_SPI_MEM_*. |
| _deps | Dependencies from PBL_DEVICE_DEPS(), or NULL. |