This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Forwarding GPIO Input to another GPIO Output

Hi,

I have a custom PCB board with a nRF52832 and a motion sensor. I cannot use a signal analyzer on the output from the sensor because of the shape and small size of PCB and its components and tools available. However, my board has a GPIO pin which I can use for testing (not used atm).

I was wondering if the GPIO module provides the capability to automatically "copy" an input signal (e.g. output signal from the sensor) to another GPIO pin (set as output for test purposes).

I know I can set an interrupt handler on such input pin and manually "copy" the pin value to the test one. However, I would like to know if it is possible to handle this situation via hardware without using software.

Thank you for any suggestion.

Regards, Marco

  • Hello Marco

    You can have a GPIO pin toggle trigger a toggle on a secondary GPIO by using PPI and GPIOTE. You can configure the pin to trigger a GPIOTE event which, through PPI, triggers a toggle TASK at the second pin. This all runs through hardware. You can find the PPI example in [SDK FOLDER]\examples\peripheral\ppi. The example documentation can be found on the infocenter here

    Do mind though the general GPIO pins can only detect whether the voltage at the pin is high or low. Higher granularity will require use of ADC or comparator, or serial communication from the sensor itself.

    Best regards

    Jørn Frøysa

Related