This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM3730, ARM, MMU, Prefetch Abort

Hello.

I'm having a lot of trouble trying to remap the exception vector table to a different location (namely to the internal SRAM, starting at 0x40200000). I'm doing this by accessing CP15 registers. But I obviously do something wrong. This problem has come up quite a few times but I gained nothing from scrutinizing the discussions. I do a write to the Vector Base Address register by invoking the following operation:

LDR R0,base
MCR p15,#0,R0,c12,c0,#0

"base" is an offset leading to a constant value of 0x40200000

Then I am trying to enable MMU which is where thing go sour:

MRC p15,#0,R0,c1,c0,#0
ORR r0,r0,#0x1
MCR p15,#0,R0,c1,c0,#0

At this point a Prefetch Abort takes place, and the program flow pick up at an address 0x4020000c (which actually indicates that the Vector Base Address was successfully relocated).

I don't know much about ARM Assembly, so I really need some experienced input. What is the right way to do it? What am I missing? 

Please help.

Thank you in advance