We have a hall sensor with pwm output encoding the information in the duty cycle of pwm. Now we would like to read the duty cycle without the use of an interrupt, but solely using the nrf52840 timer peripheral.
It seems impossible to find an example on how to have the timer start counting on a rising edge, stop counting at the falling edge and placing the counter value in the CC register. That is actually all we need. We do not need an interrupt once the CC register has been updated nor do we need each single CC register value. We would like the OS to be in control of when a value is required, but it should be up to date, once we need the pulse with value.
Can you provide an example for this?
Thanks
Martin