Hi all
Here is a problem about the using of TCM.
I put two functions(they are just the same) of time-delay in the ITCM and the normal RAM, using the scatter file, and execute them one after another.
But at the end of func in ITCM, there is a PREFTECH abort(May it didn't execute fully at all).
During my boot.s, only ITCM bank0 was initialized:
MOV r9, #0x0
MCR p15, 0, r0, c9, c2, 0
LDR r0, =BASE_ITCM_BANK0 ;0xc20000
ORR r0, r0, #0x0D
MCR p15, 0, r0, c9, c1, 1
Here are the points that confused me:
1 why this prefetch abort happened ?
2 I wonder whether initialization of the ITCM_BANK0 is enough.
Sorry about my poor english T T, and thanks for your apply.
Hello,
from the 'MCR p15, 0, r0, c9, c2, 0', I guess you use ARM11.
If it is true, is 'MOV r9,#0x0 valid.
I think it should be 'MOV r0,#0x0'.
Didn't you select ITCM1?
Otherwise, you had not set the Instruction TCM Non-secure Control Access Register.
Wasn't your ITCM access from the Non-Secure world?
Please check them.
Best regards,
Yasuhiko Koumoto.
Hi こおもとせんせい
Thanks a lot for your reply.
It seems after my config about the TCM's Non_secure control register, the program runs without exception :
MOV r0, #0 ; select ITCM bank0
MCR p15, 0, r0, c9, c2. 0
LDR r0, =BASE_ITCM_BANK0
MOV r0, #1
MCR p15, 0, r0, c9, c1, 3
But I didn't select ITCM bank1, as long as DTCM.
And also, it looks there is no that much difference between those two delays in time-consume.
did you measure the performance on condition the both instruction and data caches were disabled?
View all questions in Classic processors forum