| |||||
Technical Support Support Resources
Product Information | ARTX: PROGRAM EXECUTION CAUSES TRAPSInformation in this article applies to:
QUESTIONMy ARTX166 Programm does not work because TRAPs are executed. ANSWERThere 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 THREADSThe following Discussion Forum threads may provide information related to this topic. Last Reviewed: Monday, May 09, 2005 | ||||