summaryrefslogtreecommitdiffstatshomepage
path: root/examples/hwapi/button_reaction.py
diff options
context:
space:
mode:
authorKrzysztof Blazewicz <krzysztof.blazewicz@uxeon.com>2016-09-07 18:40:34 +0200
committerKrzysztof Blazewicz <krzysztof.blazewicz@uxeon.com>2016-11-16 12:43:27 +0100
commit63ca7a211ac832fb885753ad837a7b3de2aaa5da (patch)
tree9a75cc7e215c465ec6cb460520acd977f16f5b14 /examples/hwapi/button_reaction.py
parent0280b2c1b1eb761fa66db620c96cdcf276c2cf94 (diff)
downloadmicropython-63ca7a211ac832fb885753ad837a7b3de2aaa5da.tar.gz
micropython-63ca7a211ac832fb885753ad837a7b3de2aaa5da.zip
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.
Diffstat (limited to 'examples/hwapi/button_reaction.py')
0 files changed, 0 insertions, 0 deletions