I have been attempting to manually check for a compare interrupt flag in an if-statement but i
am only succeeding in setting whichever bit i am attempting to check and then also making the conditional true.
Which it then proceeds run the code in the if statement. (1<<0) was just confirming to me that indeed i am just setting flag bits.
I assume i can store the flag register in temporary variable to compare against.
if(TCA0.SINGLE.INTFLAGS & (1<<0)){ TCA0.SINGLE.INTFLAGS = TCA_SINGLE_CMP0_bm;// Clears flag TCA0.SINGLE.CMP0 += THIRTY2_MS; longCounter++; led_flash_counter++; led_low_PWR_count++; }