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.

RM57L843: Changing the Stack Size

Part Number: RM57L843
Other Parts Discussed in Thread: HALCOGEN

Hi!

I have a user-defined function inside which I have a local array of size 550 (uint8 uc_array[550]). 

Whenever the program flow/control executes this function, after its successful execution, it jumps to "_prefetch". When I decrease the array size from 550 to lets say 250 or so, it works fine.

I guessed that its a problem with the stack size. Therefore, I increased the stack size from 0x00001000 to 0x0004500 (User Stack Length field) in Halcogen so that it reflects in my .map file. Even after doing this, I still get the same problem i.e., stopping at "_prefetch" post execution of the function.

I tried to see the value of CPSR instruction status register and the address register to see that maybe an imprecise abort has got the controller in this situation. I find the status register with a value of "0x00000000" and the instruction address register to be, "0x00FE00FF".

I want to understand why is this happening and how to go about it (as in declaring local variables of higher sizes and not expecting "_prefetch").

Thanks,

Chetan. 

  • Hello,

    Prefetch abort exception occurs when an instruction fetch causes an error. All prefetch aborts are synchronous.

    The reason for Prefetch Abort can be analyzed by reading the Instruction Fault Status Register (CP15 IFSR), the Instruction Fault Address Register (CP15 IFAR), and the Auxiliary Instruction Fault Status Register (AIFSR). Is the instruction at 0xFE00FF a valid instruction? 

    Can you please check the FAQ first?