I want to reset the timer before the timer interrupt.
In my case, I will use the Mod bus protocol for serial port. I had to reset the timer for each byte sent and send data if the timer reach 3.5 ts(Time for sending byte). It mean if we didn't receive any byte until (3.5ts s ) we send data, if not, we add new data in the buffer.
So in this case, I want to use two interrupts:
- One interrupt for the serial port Rx. In this interrupt I will reset the timer.
- One interrupt for the Timer where I will send the Buffer.