|
PebbleOS v4.47.0-757-g12b6c531f
|
DMA controller made of the DMAMUX1 request router and the DMA1 and DMA2 controllers behind it. More...
Data Structures | |
| struct | pbl_dma_stm32h7_stream |
| Stream state. More... | |
| struct | pbl_dma_stm32h7 |
| Controller. More... | |
Macros | |
| #define | PBL_DMA_STM32H7_NUM_REQUESTS 108U |
| Request lines of DMAMUX1, 1 to 107; 0 is none. | |
| #define | PBL_DMA_STM32H7_NUM_STREAMS 16U |
| Streams, 8 of DMA1 then 8 of DMA2. | |
| #define | PBL_DMA_STM32H7_DEFINE(sym, _name, _mux, _dma1, _dma2, _clk1, _clk2, _i0, _i1, _i2, _i3, _i4, _i5, _i6, _i7, _i8, _i9, _i10, _i11, _i12, _i13, _i14, _i15) |
| Define the controller. | |
DMA controller made of the DMAMUX1 request router and the DMA1 and DMA2 controllers behind it.
Channels are the request lines of DMAMUX1, from the reference manual, as consumers name them in the devicetree. The first slave configuration of a request binds it to a free stream of DMA1 or DMA2, which it keeps; there are 16. The configuration of a channel is a mask of stream configuration bits: the priority, DMA_SCR_PL_MASK, and the bufferable transfers the USARTs need, DMA_SCR_TRBUFF.
Each stream has its own interrupt line: the controller connects them all, with priority CONFIG_DMA_STM32H7_IRQ_PRIO, and enables a stream'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 memory the DMA controllers reach: not in the DTCM.
| struct pbl_dma_stm32h7_stream |
| struct pbl_dma_stm32h7 |
Controller.
| Data Fields | ||
|---|---|---|
| struct pbl_clk | clk[2] | DMA1 and DMA2 clocks. |
| struct pbl_dma_controller | ctrl | DMA controller. |
| uintptr_t | dma[2] | DMA1 and DMA2 registers. |
| pbl_irq_t | irqs[PBL_DMA_STM32H7_NUM_STREAMS] | Interrupt line of each stream. |
| uintptr_t | mux | DMAMUX1 registers. |
| struct pbl_dma_stm32h7_stream * | streams | State of each stream. |
| #define PBL_DMA_STM32H7_DEFINE | ( | sym, | |
| _name, | |||
| _mux, | |||
| _dma1, | |||
| _dma2, | |||
| _clk1, | |||
| _clk2, | |||
| _i0, | |||
| _i1, | |||
| _i2, | |||
| _i3, | |||
| _i4, | |||
| _i5, | |||
| _i6, | |||
| _i7, | |||
| _i8, | |||
| _i9, | |||
| _i10, | |||
| _i11, | |||
| _i12, | |||
| _i13, | |||
| _i14, | |||
| _i15 | |||
| ) |
Define the controller.
| #define PBL_DMA_STM32H7_NUM_REQUESTS 108U |
Request lines of DMAMUX1, 1 to 107; 0 is none.
| #define PBL_DMA_STM32H7_NUM_STREAMS 16U |
Streams, 8 of DMA1 then 8 of DMA2.