2021-05-04 09:11 AM
Hi guys, I'm having this issue where I kept getting a Transfer Error when setting up a DMA.
One of the replies I got is that DMA1 can't reach the memory area of DTCM, which would explain why it can't transfer the context from the buffer into the peri address.
What I don't get, is that I am just rewriting code, I have my old code tested and it works no problem, however with the new code I am allegedly writing into the DTCM somehow every single time. The only thing I change was using the "STATIC" modifier when declaring the variables.
Is there a way to stop writing to it?
First picture is of OLD CODE:
Second picture is of NEW CODE:
The big difference of the two is the "M0AR" register is significantly different, which can make sense if I am using the DTCM as its not as big as flash and nothing should be really stored in there.
but how did I start storing variables in DTCM?
2021-05-04 01:56 PM
Your pictures compare the S5CR register in your old code to the S1M0AR register in the new code. Those are not comparable.
As explained in your last post, your linker script controls where variables are stored. If you don't know how to modify yours to get what you want, post it.
I have to believe the problem is elsewhere though since 0x84 is in ITCM, which is never used for storing variables.
2021-05-04 01:58 PM
Hey buddy, fair enough
Anyways the problem was fixed. already explained in the other post. Couldnt delete this thread.