Processing Time Vs Interrupt Time

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.

Reply to
f0rep1ay
Loading thread data ...

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.

Reply to
larwe

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
 Click to see the full signature
Reply to
Tim Wescott

s

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

Reply to
bigbrownbeastiebigbrownface

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.