I am working a project using the ATtiny404. This is my first use of the ATtiny series and I recently struggled to understand why I was having issues getting the TCB0 to properly run in 'Periodic Interrupt' mode. I ended up discovering that the interrupt flag needed to be manually cleared prior to exiting the ISR. This is the first time that I have encountered this necessity and have always relied on the RETI to reset the interrupt flag. Shame on me for not carefully reading the manual!
Would someone please explain why this is the case where the interrupt flag is reset manually? Is there an unseen advantage to doing it this way?