2019-04-09 08:02 AM
Hi,
stm32f7
SAI1B DMA2 stream 5 and 0 conflict with SDMMC2 stream 0 and 5 ????
I need to record data to and playback from SDMMC2 with DMA to and from SAI1B.
SDMMC2 uses both stream 0 and stream 5.
DMA2_Stream5_IRQHandler
DMA2_Stream0_IRQHandler
The peripherals are on different channels.
can write my own IRQHandlers to resolve the conflict or can there only be one peripheral per stream on DMA1 and DMA2 ?
I have managed to move some USART and SPI to DMA1 to free up some streams but this conflict leaves me stuck!
Would much appreciate any guidance.
2019-04-09 08:22 AM
One channel selectable per stream. Single device active at a time.
You could perhaps use a mutex to arbitrate ownership of the stream, but it is not a task I would envy, nor one I would be sure the outcome would work satisfactorily. ie I think it could be demonstrated to be able to be shared, but the sharing may not be sufficiently cooperative to be deemed successful in the final application.
2019-04-09 08:54 AM
maybe I can assign the same DMA stream to different devices and init / deInit them
when actually using them. for instance I guess I don't need to write to the SD card while I'm reading from it.
maybe just use an if statement in the IRQhandler ?
DMA2_Stream5_IRQHandler
{
if ( A == 1) {do one task}
else { do something other task}
}