@Jack Peacock_2 How about configuring a gpio interrupt to be triggered for both edges,let's say, if I consider rising edge to be first & next falling edge to be second edge.Declare one byte volatile variable, out of which only first 2 bits, bit-0 & b...