Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I have enabled it as shown inside the I/0 View with TWEN and TWIE bits enabled. However, after sending a START condition, I do not see the TWI-interrupt routine being called.
\$\begingroup\$To be honest, my knowledge of embedded debugging is rather limited. However I have used the XMega TWI module quite extensively in C/++. Random tips: Forcing the START condition in the STATUS register does not schedule any interrupt to be called. You normally write the ADDR register and the interrupt is called once all bits are sent. Also, you may not be able to see the ISR executing just by stepping the code. You may have to insert a breakpoint in the ISR.\$\endgroup\$
\$\begingroup\$@Dzarda: Regarding the first random tip, in the datasheet it says after a START condition has been transmitted, the TWINT Flag is set by hard-ware. So it should fire the ISR. I indeed have a break point there.\$\endgroup\$
\$\begingroup\$Are you debugging hardware or in the simulator? - Are the TWI output pins configured correctly (output w/ pull-up? TWI cannot send anything if/while CLK is held low.\$\endgroup\$
after a START condition has been transmitted, the TWINT Flag is set by hard-ware
. So it should fire the ISR. I indeed have a break point there. \$\endgroup\$