ICD3 Debug Information About Breakpoint and Stopwatch

Status
Not open for further replies.

nick703

Advanced Member level 1
Joined
Oct 17, 2011
Messages
422
Helped
21
Reputation
44
Reaction score
22
Trophy points
1,298
Location
surat
Visit site
Activity points
3,987
hello friend i have icd3 and i want to debug my simple function continuously. like below

Code:
void Func1 (void)
{ //   put breakpoint1

      // some code here

} //    put breakpoints 2

so when i enter the function i have put 2 breakpoints OK . so i want this 2 breakpoints between code simulate continuously . is that possible then please reply .


and anther question is in my delay function like MsDelay(2) is 2ms delay when this function call that time i added stopwatch to how much take time and this time this function perfectly saw me 2ms in stopwatch . but when i set timer delay means use of pic32 timer 3 and load the value of PR2 resister that time stopwatch give me a wrong delay result and another strange thing is when i load different PR2 value that time stopwatch display same time no difference so how to check my timer delay function.

please reply me !!!!
 

Typically when debugging C code, breakpoints must be positioned on executable statements, not programming constructs like curly braces.

If you need to position a breakpoint before a C statement, you can insert an inline assembler NOP statement at the point in your code where you wish to position the breakpoint.

Of course, this technique will effect execution times as long as the NOP statements remain regardless of whether or not the breakpoints are active.


BigDog
 

thanks for reply bigdogguru i understand waht u say but my aim is my stepping sequence rotate continuously between two breakpoints becuse i have function that call in timer isr function so in run time how can i check this value ?

every time i have right click and select " Set PC at Cursor " .

and also what about my second question .
 

When using an ICD2/3 or PICkit for that matter, the contents of registers or other device storage can only be examined when code execution halts at a breakpoint or between single steps.

Examining registers or other device storage during unimpeded runtime typically requires the use of a true In Circuit Emulator (ICE), like:

MPLAB REAL ICE In-Circuit Emulator

There are circumstances which even prevent the utilization of an ICE, in which case external instrumentation is required, like a scope or logic analyzer.

BigDog
 
Obtain an inexpensive USB based logic analyzer, capture the series of step output for stepper motor and calculate the duration.

You can buy inexpensive logic analyzer clones on eBay for just a few dollars:

**broken link removed**


BigDog
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…