mirror of
https://github.com/trezor/trezor-firmware.git
synced 2026-03-03 14:06:40 +01:00
dma_transfer_in_progress boolean variable has been added for tracking of dma2d current state (transferring/idle). The variable is set after dma2d successful transfer start and cleared inside the dma2d_wait() function after the dma2d transfer has finished. dma2d_wait() function has been refactored from HAL based busy waiting variant to a priodical polling of dma2d status flags (TC, TE, CE) and sleep/wake concept using the dma2d to wake MCU when such event occurs. WFE (Wait For Event) instruction is used for MCU sleep entry. The "SCB.SCR.SEVONPEND" bit is used to enable MCU wake-up with NVIC disabled IRQs. [no changelog]