I need to capture the time between rising transition of a GPIO pin in order to integrate a Manchester decoder of an RFID reader chip. In my particular case, the reader chip emits a waveform where the minimum time between the rising edges is ~256uS. The device I'm working on is a BLE peripheral and ideally, I'd like to run both interfaces concurrently.
This is all running on an nRF52840-DK board with FreeRTOS.
I hacked together an initial prototype where
- I linked a PPI with GPIOE and TIMER1 where the rising edge causes the timer count to be captured
- An IRQ on the GPIO rising edge to cache the last capture (thus getting a very accurate measurement)
This all works fine when BLE is disabled, however as soon as enable it (the device starts advertising), I appear to be missing transitions.
I'm yet to really drill down to identify how/when the transitions are missed, however I thought I might check to see if anyone can suggest a better scheme to capture the timing.
Thanks.
DJ