How to read time from one pulse ON time to another pulse ON time

Well, what did you change?

I actually changed nothing. I made that code tested it, was working, then posted here. after a while I did further testing with different PWM waveforms, was working fine, but then suddenly it stopped giving me correct values

Your ISR's are kind of crazy. You test the same thing that should cause the interrupt in the first place.

Here is what one should really look like:

void PWMread1 ()
{
    startTime = micros (); 
}

your terminology is confusing

you set done in PWMread2(). what if it arrives later?

you could have each ISR increment a byte counter. two measurements have be captured every 2 increments (i.e. bit 0 is zero

Also you break ISR rules. Your passing variables should be declared volatile. You may have made other blunders. Reading the passing variables are in a critical section, you need to disable interrupts in the main program when you read them.

but it does not matter the first signal won't come again until the second signal will not come do u get what I am trying to say? the signals are synchronized together.

First fix your broken ISR code. Then talk about program logic.

man dammit, I totally forgot about that. I just noticed it, thanks a lot. yes, I will try it tomorrow, Right now I came home and I don't have the equipment. And will update here

They don't look like PWM signals to me, rather they look like 2 single pulses, albeit with a bit of ripple when high

Can someone please provide a definition of what constitutes a PWM signal ?

The example is so abbreviated that it's impossible to say whether it's PWM or not. There is insufficient context. Only one pulse per signal is shown, so whether the duty cycle or frequency or both vary, is not known.

hello guys just an update, the code works only problem was occurring due to volatile. It is giving me proper values according to what oscilloscope is showing

thanks a lot for the help

the pulses are being generated from 556 and monostable IC(cd14538be). I am just taking these pulses into controller because I have to monitor some stuff. These pulses are being used by analog circuit

So they are not PWM pulses after all