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

How to implement GPIOTE driver in SDK15

I'm attempting to implement a simple, GPIO driven interrupt system using SDK15, but I can't seem to find any examples using the nrfx_gpiote driver, or documentation on how the driver is supposed to be invoked at all. Does anybody know what the required driver calls are, or if there's any actual implementation documentation?

Parents Reply Children
  • The nrfx API is not used directly in SDK 15.0.0, and all internal modules use the legacy layer. The nrfx_gpiote driver and the nrf_drv_gpiote are virtually identical except for naming. You can see the renaming in nrf_drv_gpiote.h, where the nrf_drv_gpiote functions etc. are defined to the nrfx_gpiote equivalents. I do not see any benefit of using nrfx directly at this point, and suggest just sticking with the legacy driver API as it does not introduce any overhead and is used in the rest of the SDK.

    You can use nrfx directly in the same way as you would nrf_drv_gpiote if you want to, but there are no examples in the SDK and you will need to do some tweaking with the configuration. Most importantly, you need to remove all GPIOTE legacy defines from sdk_config file If you want to use the nrfx API directly. It is not enough to set them to 0, as they will be used as long as they are defined.

    (The reason for making the nrfx in the first place was not to replace nrf_drv per se, but to separate it from the SDK so that it can be used in other projects, such as Zephyr).

Related