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

How do I use the GPIO pin on nrf52 devices?

Hello, just a few quick short questions regarding nrf52 devices:

  1. Do I have to configure and initialize them before using?

  2. Which function should I use? I'm going with nrf_gpio_pin_write, hope its alright.

  3. The most important one: I'm using QIAA package, and I want to operate P22 pin or pin 1.07, how do I do that? Should I write:

    nrf_gpio_pin_write(22, 1)

or

nrf_gpio_pin_write(103,1)

???

Edit: Make sure you use nrf_gpio_cfg_output properly first, before setting and resetting target pins.

Parents Reply
  • Thank you for this information! I have been looking for this for half an hour now because I want to know it backwards. I wanted to know which pin is pin 45. All threads just lead to the macro which is no help. Why does nordic not provide such basic information somewhere? The folder components\drivers_nrf\hal\nrf_gpio.h  does not even exist in my SDK 15.3...

Children
No Data
Related