micropython/stmhal/hal/f4
Krzysztof Blazewicz 63ca7a211a stmhal/dma: precalculate register base and bitshift on handle init
Current version of HAL drivers optimize IRQ handler by using precalculated
DMA register address and stream bitshift instead of calculating it on every interrupt.

Since we skip call to `HAL_DMA_Init` on reused DMA, fields StreamBaseAddress and StreamIndex
of DMA handle are not initialized and thus leads to SegFault in `DMA_IRQHandler`.

HAL_DMA_Init is a big routine and we do not need to call it on each use of DMA
(ex.: series of I2C operations) and DMA_CalcBaseAndBitshift is really small and
releasing it increases code size by only 8 bytes.
2016-11-16 12:43:27 +01:00
..
inc stmhal/hal/sd: reapply HAL commit 1d7fb82 for f4 2016-11-16 12:43:27 +01:00
src stmhal/dma: precalculate register base and bitshift on handle init 2016-11-16 12:43:27 +01:00