We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
Iam working on a luminary micro based cortex M3 processor. Iam not using any RTOS. Iam trying to use system timer tick (luminary software based) packet transmitter code.
The code works on stepping using debugger but goes to interrupt when run (which is just going to the same place). Because of this i couldnt test my code at all.
Please help me understand why this problem is happening and how to solve it.
Thanks, vivek
what are talking about?
Please explain what you mean by this
OK. I try to explain a bit clearly.
I have some code which is compilable. i use Keil IDE to go into debug mode. I single step the code till main. After this, if i single step through the code, it is possible to execute the code.
I want to test whether the desired intent of my program is fulfilled. So i cant keep single stepping through the code each time right. So if i press RUN button in the IDE, the code immediately goes to default interrupt handler.
Iam not expecting interrupt at that point. At least i want to know the reason why it went into interrupt mode only when i run the code and not when i step. This happens in different places in the code each time.
I have few more questions.
1. Does it have something to do with SWI handler/ retarget?
2. Is it possible to disable unused interrupts (the code should not go to interrupt handler at all).
which interrupts are enabled in the VIC...?
Iam not sure if all interrupts are enabled because, i call a function InterruptMasterEnable(); which has few codes in assembly.
Ok. Thats a nice input.
I will check if it is possible to selectively enable only few interrupts which are required.
You need to determine which interrupt is actually occurring!
i tried to enable the interrupts after calling the third party TCP stack routine.
even when the interrupts were not enabled, when i run the code again, i found the program counter pointing to the default interrupt handler.
The third party stack didnt have many initialization to do, i just have to pass, IP address, subnet mask and default gateway.
Note that the ARM doesn't just have normal interrupts. It can also produce an exception for an invalid instruction (for example as result of a stack over/underflow), unaligned data access, access to protected memory, ...
Which is precisely why You need to determine which interrupt is actually occurring!
I am also facing the INTDEFAULTHANDLER problem while dealing with LM3S6911. While I started debugging my code in single steps, my program didn't go into the Interrupt default handler routine or in other words my program not stuck any where but whenever I had tried to run the program it went into Interrupt default handler (went to halt state as it enters into an infinite loop). I had done many combination to over come and to find out the problem but from where this external or internal interrupt is being created, not able to find as yet. I had also checked my code with different delay duration but all in vain.
So any one give a proper suggestion to deal with this scenario or to over come the fault.
The proper suggestion is (again): You need to determine which interrupt is actually occurring!
Once you know which interrupt is actually occurring, then you can start thinking about how to determine what causes that interrupt to occur.
Once you know what causes that interrupt to occur, then you can start thinking about how to stop it occurring!
HI,
Which start up file are you using? There are many interrupts which are not handled (no routines declared). In such a case the code flows to default interrupt. The PC will definitely go into defsult handler if you get some interrupt routine which is unhandled. Systick interrupt was the one which gave me trouble. check for the interrupt status registers to find out which interrupt has occurred. You might not be expecting the interrupt. You can try putting zero instead of a routine name(this might not be a good solution, but good for a trial) or declare a routine.
hi Vivek
Would u give me your contact details so that we may be in touch to solve our problem regarding Luminary. By the way which controller you are using now?
how do you solve the problem? My include headers are
#include <stdio.h> #include <string.h> #include <math.h> #include <malloc.h> #include <stdlib.h> #include <time.h>
#include "limits.h" #include "driverlib/loc_time.h"
#include "inc/hw_ints.h" #include "inc/hw_memmap.h" #include "inc/hw_nvic.h" #include "inc/hw_types.h" #include "driverlib/ethernet.h" #include "driverlib/flash.h" #include "driverlib/gpio.h" #include "driverlib/uart.h" #include "driverlib/interrupt.h" #include "driverlib/sysctl.h" #include "driverlib/systick.h" #include "utils/lwiplib.h" #include "utils/uartstdio.h" #include "utils/ustdlib.h"