Hi there,
What about creating two interrupts, one for the Beginning and a seperate one for the end of the Pulse?
or Set it in a way that the Rising edge INT , blocks until the falling edge arrives? breaking it out after, I see You have it as “change” , may be better if it was edge or level? and add a count in there too.
just tossing some thoughts… interesting the duration though is exactly 1000 ? that’s peculiar at best IMO.
Keep digging, you’ll get there. How do you get the PWM into the Xiao? You got any pictures of this apparatus and connections ?
GL PJ