Hello Rodo,
Let's assume that you were to use the RTC to wakeup the MCU, and then use a TPM channel for measurement of pulse width, perhaps using input capture. I can still see a fundamental problem with using a wakeup sampling interval of one second.
You say that the initial start pulse will have a nominal duration of 2.25 seconds, and will not exceed 2.5 seconds. Since you do not know when the start pulse commenced relative to wakeup, a 2.25 second pulse could give a measured period from wakeup somewhere between 1.25 and 2.25 seconds. Any interval between these limits would need to be interpreted as a valid start pulse.
However, it would also be possible for a pulse of up to 3.25 seconds duration to sometimes be interpreted as a valid start, but this does not meet your stated requirements. For pulse duration greater than 2.5 seconds to always be treated as an invalid start, the wakeup sampling interval would need to have a maximum value of 0.25 seconds. Using this interval, a period measurement of between 2.0 and 2.25 seconds would indicate a valid start. Pulse widths of less than 2.0 seconds, and greater than 2.5 seconds would always be rejected.
In practice, the sampling interval might be somewhat less than 0.25 seconds, to allow for a tolerance on the RTC period.
Since your pulse durations are quite long, the TPM input capture may be less suited for your pulse measurement. For simple input capture operation, the pulse period should preferably be less than the TPM overflow period. If this is achievable, it will involve large prescale divider settings, but will restrict the TPM to no more than a single overflow during the measurement period.
When it is possible for multiple timer overflows to occur, these must additionally be counted (within the TPM overflow ISR code). Combining input capture results and timer overflow count will provide best timing resolution, but can be quite complex.
For the measurement of longer periods, it may suffice to use the overflow count only (and not bother with the input capture readings). For example, if the TPM overflow period were set for, say 10ms, this would be the resolution that could be achieved for each period measurement. I suspect this might be sufficient for all your pulse width measurements.
In addition to the pulse width measurement, I assume you will also need to measure the gaps between the various pulses. Minimum limits may be needed, in addition to maximum timeout limits.
Regards,
Mac