DMA Stream Allocator
Plan DMA stream allocation on STM32 microcontrollers. Check headroom, utilization, and detect conflicting stream requests before you lock it into firmware.
About This Calculator
On STM32 MCUs, DMA requests are mapped to fixed stream/channel pairs per peripheral. Because streams are scarce (8 per controller), designers must plan allocation before coding. This calculator tracks how many streams remain and whether a new request fits, and flags low-headroom situations.
How to Use
- Select the DMA controller(1) and set the total number of streams for it (default 8).
- Enter how many streams are already allocated to other peripherals.
- Enter the number of streams the new request needs and any reserved spare streams.
- Read the free-streams and pressure outputs; a '1' in the warning means you are down to 1 or 0 free streams.
Formulas
| Free streams | Free = Total - allocated - reserved |
| Utilization | Util% = allocated / total × 100% |
| Fits? | Can allocate = Free ≥ Needed ? 1 : 0 |
Design Notes
DMA1 stream/channel mappings differ from DMA2. Always cross-check the reference manual table for your exact part number.
Keep at least one spare stream when possible — later firmware changes are far cheaper when you have headroom.