Keil Logo

ARTX: PROGRAM EXECUTION CAUSES TRAPS


Information in this article applies to:

  • ARTX-166 Beta Version

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.

FORUM THREADS

The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Monday, May 9, 2005


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.