[riot-notifications] [RIOT-OS/RIOT] STM32_common/dma: Optimize the latency in the hot path (#14096)

Koen Zandberg notifications at github.com
Wed May 27 16:51:34 CEST 2020


> What happens if the device goes to sleep mode (STOP). Shouldn't the DMA be powered on again after a wake up ? It seems dangerous to me to only call `dma_poweron` in `dma_init`.

My assumption was that the DMA is not automatically powered off by the MCU. Preferably I would want to have the DMA be powered during the acquire and be turned off again during the release *if* no other streams are active. This adds additional complexity and I didn't want to include it in this PR.



> configure is split in setup/prepare but in the change, both functions are called one after the other. Do you have a use case where prepare is called somewhere else ? Or maybe you forgot to push dma_prepare additions in DMA related peripheral (UART, SPI) ?

Yes, In the SPI DMA PR adds them. The setup is used [here](https://github.com/RIOT-OS/RIOT/pull/14097/files#diff-993728c780a3d5357c0032c8c1adfd11R179-R184) in the SPI acquire function. The prepare function is later used [here](https://github.com/RIOT-OS/RIOT/pull/14097/files#diff-993728c780a3d5357c0032c8c1adfd11R228-R241). For example during a `spi_transfer_regs()`, the prepare is called twice where previously the whole configure function was called twice.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/14096#issuecomment-634714496
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200527/773bcd05/attachment-0001.htm>


More information about the notifications mailing list