Go Down

Topic: Help using logic analyzer on Arduino (Read 10369 times) previous topic - next topic


3-4 MS before the ISR got called,

WTF? That's a heck of an interrupt latency. There must be something else at play there like somebody disabling ints for too long.

Sorry- that was a major typo. I've updated the original post. PLEASE RE-READ that post everyone!

Does anyone have a good way to, for example, run a test all day and get max, min, avg etc times?

Haha... When I read that, I read it as uS to begin with... Funny how our brains do those things...


I used the Logic analyzer to profile my ISR response & latency time.

I was seeing 3-4uS before the ISR got called, and ~6uS inside the ISR.
Oddly enough, getting back from the ISR to loop() took a horrible amount of time. I never understood why.
There were some posts about the ISR not clearing the interrupt flag. I tried clearing it in the ISR, but didn't reach any reasonable conclusions.

I'm starting to think it may be better to bite the bullet and ditch the Arduino safety net.
At the same time I'm not looking forward to bringing up a microcontroller from scratch.

Thanks for posting those numbers, that's very helpful.

I'm sure you understand this but for those who don't...

The ~6uS of ISR time is mostly due to what I'm doing in the ISR. This is not a specification by any means, and is actually quite long for a typical ISR.
My application doesn't need very fast response.


Small typo. BIG difference :)

The extremes may actually be more important to know than the average.

Exactly, in a system that has to respond within say 100uS the only thing that matters is if it ever takes > 100uS and it would be nice to stress test for 2 days and see if it ever happens.

I suppose that can be done with timed triggers if that feature is available, but average times in a function and other profiling is useful as well.

I'm just wondering if it's worth adding some hardware to allow a plug-in debugger to help with this, of interest to maybe < 1% of Arduino users but an interesting project.

Rob Gray aka the GRAYnomad www.robgray.com


The problem I am seeing with Arduino IDE 0023 on Windows XP, SP3 is that when the IDE is running with the console open for many hours,
there is a loss of communication to the Arduino. Red error messages are displayed in the lower half of the console.

Others have reported something similar.
I need to double check to make sure the screensaver or power management isn't kicking in and turning off the USB port.

I use TerraTerm.

We use that too, but going back and forth between the IDE to compile & download, then having to close the com port is a pain.
For an overnight run while monitoring the UART is just fine.

BTW- there is a virtual com port software called com0cm which creates virtual com ports, so that multiple apps can *effectively* use the same com ports at the same time.
Obviously there is some stream multiplexing going on, but when it works it makes life easy.

I haven't been able to get it working yet- but others have figured it out.

Go Up