gerhardf wrote:
hello,
reading the status register with function tc_get_status() multiple times isn't a good idea because all of the flags are cleared at the first reading of the register.
so read the register only once and write it to a variable and check the variable afterwards.
regards
gerhard
Ahh yes this makes sense now. I created variable name uint32_t tc_status, and put that at the start of main.c. I then cut the get status function from the two brackets, put it before the if statements in the TC0_Handler, then set my tc_status to equal get status function.
The result was it worked after compiling.
Thank you for the help Gerhard.
EDIT: I've tested the code and showed the results of changing RA Compare value from 50, to 128, to 205 in three different waveforms below, for anyone wondering about what they should be seeing when successful.


