cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop writing in memory where DMA can't access

CLeo.1
Senior II

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:

0693W00000ANKPgQAP.png 

Second picture is of NEW CODE:

0693W00000ANKPvQAP.pngThe 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?

2 REPLIES 2
TDK
Guru

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.

If you feel a post has answered your question, please click "Accept as Solution".

Hey buddy, fair enough

Anyways the problem was fixed. already explained in the other post. Couldnt delete this thread.