This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

A TCM problem

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.

Parents
  • 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

    ORR    r0, r0, #0x0D

    MCR    p15, 0, r0, c9, c1, 1

    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.

Reply
  • 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

    ORR    r0, r0, #0x0D

    MCR    p15, 0, r0, c9, c1, 1

    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.

Children