MPLAB Assembly error

Thread Starter

MaxHeadRoom

Joined Jul 18, 2013
30,654
Anyone have an idea on trouble shooting this error after single stepping through routine?
Pic18f23k22
Or any usual cause?
CORE-E0002: Stack under flow error occurred from instruction at 0x0000be
Max.
 

Thread Starter

MaxHeadRoom

Joined Jul 18, 2013
30,654
Is there any way in MPLAB to record or indicate the amount of cycles for a particular piece of code, without stepping through and counting?.
If it is there, I don't seem to find it.
Max.
 

joeyd999

Joined Jun 6, 2011
6,279
Is there any way in MPLAB to record or indicate the amount of cycles for a particular piece of code, without stepping through and counting?...
What jpanhalt said.

I have found that good code rarely requires counting clock cycles except in cases where timing is of critical importance, and then I usually let the peripheral hardware take care of the timing for me.

If you find yourself counting cycles often, you may be doing something wrong.

OTOH, I often use the stopwatch to verify proper settings for timers and other hardware.
 

jpanhalt

Joined Jan 18, 2008
11,087
Three places I found it helped were:
1) Working on some issue with software UART;
2) Figuring out how much data I could send between interrupts (kind of a redundant calculation); and
3) Comparing various versions of code for the same function.

I got in the habit of checking cycles, because I noticed so may posts on PicList show that metric, and it is incredibly easy to do when debugging. It takes no more time.

John
 
Top