Power Capture in CWNANO

That is between you and your compiler! :wink:

One simple thing you can do is look at how many cycles the TIO4 line is high. If you raise TIO4 at the start of your target operation, and clear it at the end, then you know how long it takes. From there you can change the time where TIO4 is cleared, etc…
With the nano you’ll need to measure TIO4 with an external scope or logic analyzer (with other CW capture devices you can simply read scope.adc.trig_count; that feature is not available on the nano).