Hi.
I'm new to SAM7X and KEIL uV4 and are converting code from another IDE (written by another person). The SW seems to "fly away" due to some exception/interrupt I cannot detect. When I press RUN (F5) from the KEIL uV4 Debugger (using ULINK2), the SW executes OK for a while and then "suddely fly away". When I execute the uV4 STOP command after some 10th seconds, I see that CPSR=0x8000009B and the SCPSR=0x8000009B. I cannot find a good explaination in the KEIL uV4 manual: Q1) How to continously see/monitor where the PC is (Register view is not refreshing) Q2) How to catch/trace/see/detect any (unwanted) excception/interrupt occuring ?
I appreciate your comments.
Regards Terje Bøhler
hi ! are you using a RTOS ? if yes it could be a destroyed task that is not unregistred from your os scheduler if no I'm preaty sure that somthing writing in you code (array loop too long or somthing like stack too short) and sends your CP to delirious adresses here's for my 2 cents
Thank you. No RTOS. I'll check further. Do you have any suggestions how to setup the Keil uV4 Debugger (w/ULINK2) to pinpoint/catch any EXCEPTIONS/INTERRUPT ? Regards Terje
Point abort and undefined FIQ/IRQ vectors, AIC whatever, to a subroutine, and break point that subroutine. Instrument the code so you can understand the flow.
Doesn't sound like you have hardware for trace, and break points are limited.
Thank you for answering.
STACK was to small for the mode assigned for these interrupts. That was the reason for this failure. Actually, it was the "wrong mode" assigned when entering the interrupt handeling routine. I really don't know why. I created a new thread regarding that problem (more details).