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
  • I got some suggestions internally:

    "obvious fix: move the ISR handler to use nrfx_gpiote in zephyr/drivers/gpio/gpio_nrfx.

    You can technically work around this by using zephyr gpio, then using ppi to tie the rest together and fork out the last event (that should generate GPIOTE ISR to the app) to EGU instead. This is however not nice and not something I've tested..."

    "first one requires rework of the gpio_nrfx module... not a small task"

  • Thanks, Simon. Can nordic update the ISR handler in gpio_nrfx driver within zephyr. We evaluated making the change ourselves but as you mentioned this is not a small task, especially that we didn't write the original code. Also, any chance we make could affect other users of this driver. Let me know if you need me to report it on Github. Thanks!

Reply
  • Thanks, Simon. Can nordic update the ISR handler in gpio_nrfx driver within zephyr. We evaluated making the change ourselves but as you mentioned this is not a small task, especially that we didn't write the original code. Also, any chance we make could affect other users of this driver. Let me know if you need me to report it on Github. Thanks!

Children
Related