Skip to content

Interrupts on ATtiny1604 #634

Answered by SpenceKonde
Raghu81 asked this question in Q&A
Discussion options

You must be logged in to vote

There is no vector for individual pins.

attachInterrupt( keeps a table of up to 8 function pointers for each port, and the interrupt that fires loops up to 8 times checking whether that pin triggered an interrupt. That is why, even after my total refactor of attachInterrupt, which reduced the overhead considerably (compare the tools -> attachInterrupt mode default option with the old implementation, note the difference in binary size.), they are still grindingly slow. Not only is there that loop, but because a function that cannot be inlined (because it's set at runtime) is called from within an ISR (that's something you should never do), it has to push every call-used register onto the s…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Raghu81
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants