PebbleOS v4.47.0-1075-g013613c8a
Loading...
Searching...
No Matches
STM32H7 BDMA

DMA controller made of the DMAMUX2 request router and the BDMA behind it, in the D3 domain. More...

Data Structures

struct  pbl_dma_stm32h7_bdma_chan
 Channel state. More...
 
struct  pbl_dma_stm32h7_bdma
 Controller. More...
 

Macros

#define PBL_DMA_STM32H7_BDMA_NUM_REQUESTS   32U
 Request lines of DMAMUX2, 1 to 31; 0 is none.
 
#define PBL_DMA_STM32H7_BDMA_NUM_CHANNELS   8U
 Channels of the BDMA.
 
#define PBL_DMA_STM32H7_BDMA_DEFINE(sym, _name, _mux, _bdma, _clk, _i0, _i1, _i2, _i3, _i4, _i5, _i6, _i7)
 Define the controller.
 

Detailed Description

DMA controller made of the DMAMUX2 request router and the BDMA behind it, in the D3 domain.

Channels are the request lines of DMAMUX2, from the reference manual, as consumers name them in the devicetree. The first slave configuration of a request binds it to a free channel of the BDMA, which it keeps; there are 8. The configuration of a channel is the priority, bits 16 and 17 as for DMA1 and DMA2.

Each channel has its own interrupt line: the controller connects them all, with priority CONFIG_DMA_STM32H7_BDMA_IRQ_PRIO, and enables a channel's while a transfer with a callback runs. Cyclic transfers run a ring of two periods, ended by the half and full transfer interrupts. Buffers must be in the memories of the D3 domain, as the SRAM4.


Data Structure Documentation

◆ pbl_dma_stm32h7_bdma_chan

struct pbl_dma_stm32h7_bdma_chan

Channel state.

Data Fields
uint8_t priority Priority, a value of the PL field.
uint8_t request Request bound to the channel, 0 when free.

◆ pbl_dma_stm32h7_bdma

struct pbl_dma_stm32h7_bdma

Controller.

Data Fields
uintptr_t bdma BDMA registers.
struct pbl_dma_stm32h7_bdma_chan * chans State of each channel.
struct pbl_clk clk BDMA clock.
struct pbl_dma_controller ctrl DMA controller.
pbl_irq_t irqs[PBL_DMA_STM32H7_BDMA_NUM_CHANNELS] Interrupt line of each channel.
uintptr_t mux DMAMUX2 registers.

Macro Definition Documentation

◆ PBL_DMA_STM32H7_BDMA_DEFINE

#define PBL_DMA_STM32H7_BDMA_DEFINE (   sym,
  _name,
  _mux,
  _bdma,
  _clk,
  _i0,
  _i1,
  _i2,
  _i3,
  _i4,
  _i5,
  _i6,
  _i7 
)
Value:
PBL_DEVICE_INSTANCE(sym, struct pbl_dma_stm32h7_bdma, struct pbl_dma_controller, ctrl){ \
.ctrl = PBL_DMA_CONTROLLER_INIT(sym, _name, pbl_dma_stm32h7_bdma_init, nullptr, \
&pbl_dma_stm32h7_bdma_ops), \
.mux = (_mux), \
.bdma = (_bdma), \
.clk = _clk, \
.irqs = {_i0, _i1, _i2, _i3, _i4, _i5, _i6, _i7}, \
.chans = sym##_chans, \
}; \
PBL_DMA_STM32H7_BDMA_CHAN_IRQ(sym, 0, _i0); \
PBL_DMA_STM32H7_BDMA_CHAN_IRQ(sym, 1, _i1); \
PBL_DMA_STM32H7_BDMA_CHAN_IRQ(sym, 2, _i2); \
PBL_DMA_STM32H7_BDMA_CHAN_IRQ(sym, 3, _i3); \
PBL_DMA_STM32H7_BDMA_CHAN_IRQ(sym, 4, _i4); \
PBL_DMA_STM32H7_BDMA_CHAN_IRQ(sym, 5, _i5); \
PBL_DMA_STM32H7_BDMA_CHAN_IRQ(sym, 6, _i6); \
PBL_DMA_STM32H7_BDMA_CHAN_IRQ(sym, 7, _i7)
Channel state.
Definition stm32h7_bdma.h:37
Controller.
Definition stm32h7_bdma.h:45
#define PBL_DMA_STM32H7_BDMA_NUM_CHANNELS
Channels of the BDMA.
Definition stm32h7_bdma.h:34
#define PBL_DMA_STM32H7_BDMA_NUM_REQUESTS
Request lines of DMAMUX2, 1 to 31; 0 is none.
Definition stm32h7_bdma.h:31
A DMA controller.
Definition dma.h:176
#define PBL_DMA_CONTROLLER_STATE_DEFINE(sym, _num_channels)
Define the class state of DMA controller sym, for the driver's define macro.
Definition dma.h:193
#define PBL_DMA_CONTROLLER_INIT(sym, _name, _init, _parent, _ops)
Initializer for the struct pbl_dma_controller of controller sym.
Definition dma.h:207

Define the controller.

Parameters
symSymbol of the controller.
_nameName.
_muxDMAMUX2 registers.
_bdmaBDMA registers.
_clkBDMA clock, from PBL_CLK().
_i0Interrupt line of channel 0, followed by those of channels 1 to 7.

◆ PBL_DMA_STM32H7_BDMA_NUM_CHANNELS

#define PBL_DMA_STM32H7_BDMA_NUM_CHANNELS   8U

Channels of the BDMA.

◆ PBL_DMA_STM32H7_BDMA_NUM_REQUESTS

#define PBL_DMA_STM32H7_BDMA_NUM_REQUESTS   32U

Request lines of DMAMUX2, 1 to 31; 0 is none.