Processing Time Vs Interrupt Time

Jan 12, 2009 3 Replies

Im using ez430-RF2500T. When the board is linked to the PC via Zigbee, it would start to convert analog data to digital using ADC interrupt. The digital data will be processed before sending it to the PC.


What i want to know is whether my processing time is faster than interrupt time? Is there a way to test the speed?


The reason for it is because i have 2 channels. Each channel goes through different proccessing functions. Thus, I want to make sure that the correct analog data goes thru the function.


t

Yes, numerous methods:

- set a GPIO pin when you start processing and clear it when you stop processing, compare this to the ADC sample rate

- disable ADC interrupts while you process data, and check the IRQ flag at the end of processing to see if a sample came in while you were processing

- have a counter in the ADC interrupt, incremented each time the ADC completes a sample. Grab the value of this counter at the start of the processing task, check it at the end. If (end - start) > 1 then you're supplying data faster than the processing task can consume it.

Etc, etc etc.

This answer will not solve the design problems to which you have alluded.

Or if you don't have hardware yet you estimate it by digging through the instruction set and making some educated guesses about how your compiler (if used) is going to lard in the overhead.

Tim Wescott Control systems and communications consulting http://www.wescottdesign.com Need to learn how to apply control theory in your embedded system? "Applied Control Theory for Embedded Systems" by Tim Wescott Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html

s

IAR EW430 includes a cycle counter / profiler in the simulator you can use to profile the processing code.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required