I am sure this Q. has already been answered but so far I could not find the answer.
How many cycles does it take to handle Timer2 interrupt in C/Arduino? Or, maybe better, where could I see the intermediate ASM code generated by GCC when compiling the C sketch?
The point is I have 16-MHz Arduino with AVR 328 (and alternatively a similar one with LGT8F328P). I want to implement a sine wave generator controlled by morse encoder and want to implement gaussian error function in the beginning and end of the tone. Timer2 frequency would be roughly 32 KHz (approx. 31.25 usec until the next interrupt).
Since there is some shifting involved (24-bit shift, 8x8 multiplication into 16-bit variable, and 8-bit shift), I am afraid I could exceed the number of cycles available in those 31 microseconds.
Is there some analysis already written? (I am quite sure it is but search engine probably does not want to show me :-) ).