At the moment i am trying to port my Arduino code to Zephyr OS. So i am a complete noob in this area. Can someone give me a clue where i can find documentation about the nrfx, ppi and gpiote parts ?
I am trying to port this and can’t find docs or a working example…
So , this The Official Zephyr nrfx Sample (The Holy Grail)
Zephyr includes an official, out-of-the-box code sample specifically designed to demonstrate how to use nrfx drivers alongside GPIOTE and PPI/DPPI hardware interconnects without CPU intervention.
Source Location: Inside the Zephyr tree at samples/boards/nordic/nrfx or directly on the Zephyr Project GitHub.
Dealing with the “Zephyr vs. NRFX Conflict”
One of the first brick walls an Arduino developer hits when porting code to Zephyr is that Zephyr’s driver initialization automatically claims GPIOTE channels behind the scenes for its own interrupt handling. If they call bare-metal nrfx_gpiote_init(), it will clash and cause compile or runtime errors.
Share this fantastic community deep-dive from the Nordic DevZone:
This explains how to let Zephyr configure the pins via regular DeviceTree/GPIO APIs, and then cleanly bridge them to PPI hardware routing using nrfx_gppi_channel_endpoints_setup() by pulling the raw event addresses like this:
If they just need to look at how the underlying functions are structured to replace their direct NRF_GPIOTE->CONFIG or NRF_PPI->CH registry assignments:
If you want to know the nuance it takes a little extra digging. One tip i will pass to you , is often overlooked “Power Domain” in the silicon die some GPIO groups are powered internally by different parts and sections of the PPI is also important to understand in General, For example different GPIO’s for sleep and wake up pins often need to be part of the same power domain in the mcu like the RTC also, for timer interrupts etc.
Also I noted the Technical Reference Guide for the Nordic parts and some of espressif parts too have those beyond the normal data sheet. they cover more in depth the specifics.