2021-05-24 11:27 PM
Hello,
I have a application that requires Matrix transposition in a efficient and fast way. I know there is a cmsis dsp matrix transposition function but maybe the MDMA could do this without CPU intervention?!
I found an example in the STM32 Cube H7 Repo and it is talking about 90 ° rotation, but it is not done in the source... only mirroring and 180° rotation.
Is it possible? I don't get the clou of the block offset address behaviour at the moment.
Thanks
Sebastian
2021-05-25 03:22 PM
I don't know what do you mean by "block offset address".
For transposition, you'd need either the source's or the destination's address to increment or decrement by an adjustable amount. In MDMA, this amount is only a few selected small steps, set by SINCOS/DINCOS. So, generally, MDMA is unusable for transposition and you have to do it "manually", however painful it is. Try to merge the data rearrangement with any other operations, wherever possible.
Btw. transposition would better fit the graphics-oriented DMA2D than any general-purpose DMA, but it's not implemented there either.
JW
2021-05-26 02:36 AM
Thx for your comment.
I had also the DMA2D in mind, but didn't find the solution there (like you said).
Transposition could be done by copy the selected size and increment by the source columns (maybe the block offset address could be used?). After the generation of the first row (at dest) the MDMA could be reinit ("semi automatic" -> reinit MDMA at end of each row)
I talk about MDMA_CxBRUR -> SUV... but I am not sure if this is possible or I did understand it wrong.
best regards
Sebastian
2021-05-26 03:11 AM
Hi Sebastian,
Ah, MDMA_CxBRUR... I overlooked that, sorry. That indeed appears to be usable for this purpose.
JW
2021-05-26 03:14 AM
I'm still in a conceptual phase and did not write any code at the moment. If you try to run this for your purpose of rotation images 90 ° I'm interested in your configuration/code and experience.
Thanks
Sebastian