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

Compatibility issues between zephyr drivers and nordic modules requiring NRFX gpio driver

Hello, we are developing a zephyr application on top of nrf52 soc. We can use the built-in zephyr drivers for most modules (ex: I2C, UART, nvm, etc.); however, for some modules (ex: input capture and counters), we had to use the nrfx hal drivers instead. See this link for reference.

Most of these implementations require disabling the zephyr GPIO driver and using the nrfx gpio driver with the PPI hardware. Although it is not ideal, this workaround has been working. The issue we are facing now is some of the zephyr drivers rely on the zephyr GPIO driver, and it won't work if we disable it. For example, many I2C sensors use a GPIO line to trigger an interrupt line. Any idea on how we could address this compatibility issue? Thx!

Parents Reply
  • Hello Markus, I was informed about the new nrfx zephyr gpio driver release (github.com/.../gpio_nrfx.c which I assume attempts to solve this issue (https://github.com/zephyrproject-rtos/zephyr/pull/37528).

    I updated my zephyr base to use this new driver but can you please provide some guidance on how we would configure an input event and/or output task for a gpio pin using this new driver? I was able to get the input event to work by configuring the pin use the zephyr API and just calling nrfx_gpiote_in_event_enable and nrfx_gpiote_in_event_addr_get post configuration. However, I am not getting it to work with the output task. I get errors if I just call nrfx_gpiote_out_init or nrfx_gpiote_out_task_enable.

    Can you please provide guidance on how we are supposed to configure input events and output tasks to assign them to PPI channels? Thank you!

Children
Related