Measure the duration of a single pulse

Hi,

I want to measure the duration of a single pulse using GPIOTEPPI and a Timer with a NRF52840.
My initial idea was to have two capture tasks for the GPIO events NRFX_GPIOTE_CONFIG_IN_SENSE_LOTOHI and NRFX_GPIOTE_CONFIG_IN_SENSE_HITOLO
But I've found out, that with the GPIOTE libray one can only set one event for a pin.
But then I've found this older post in which a method is shown using direct programming of the GPIOTE registers without the nrfSDK so that both events (LOTOHI and HITOLO) can be used together (I don't tried it until now). 

In the datasheet for the nrf52840 V1.5 on page 162 at the end of the chapter 6.10.3 Tasks and events pin configuration there is a note A pin can only be assigned to one GPIOTE channel at a time. Failing to do so may result in unpredictable behavior. which makes me unsure if the mentioned solution is ok to be used in commercial product? I have read the GPIO and GPIOTE chapters many times now and also studied Figure 45: GPIO port and the GPIO pin details but I still don't understand completely if and how it could be possible to use both events together.

So could you please explain if it is possible to use both events together? 

Thanks, Roger
 

Related