ARM Technical Support Knowledge Articles

PROGRAM EXECUTION CAUSES TRAPS

Applies to: Advanced RTOS

Answer


Information in this article applies to:


QUESTION

My ARTX166 Programm does not work because TRAPs are executed.

ANSWER

There is a wrong code sequence in the AR166_Config.c. This may cause TRAPs and crash the ARTX166 application. To fix the problem, open the AR166_Config.c file that belongs to your project and look for this sequence:

      __asm {                           ; Restore Full Context
        MOV     R4,[R0+]                ; Get MDC register or flag
        JMPR    CC_Z,Lab1               ; Flag was 0, no restoring
        MOV     R3,[R0+]                ; Restore Mul/Div Regs
        MOV     MDL,R3
        MOV     R2,[R0+]
        MOV     MDH,R3
        MOV     MDC,R4
   Lab1:

Replace the R2 with R3.

      __asm {                           ; Restore Full Context
        MOV     R4,[R0+]                ; Get MDC register or flag
        JMPR    CC_Z,Lab1               ; Flag was 0, no restoring
        MOV     R3,[R0+]                ; Restore Mul/Div Regs
        MOV     MDL,R3
        MOV     R3,[R0+]
        MOV     MDH,R3
        MOV     MDC,R4
   Lab1:

Then save the file. Rebuild your application and this will solve the problem.

Article last edited on: 2005-05-09 17:15:39

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential