We are using nRF52840DK development kit with nRF-Connect SDK to build a pre-production version of our product.
Thanks for the support in advance!
Samuel kapa
Hi Samuel,
Not sure what exactly you want to use the GPIO configuration for.
This tutorial https://devzone.nordicsemi.com/nordic/nrf-connect-sdk-guides/b/getting-started/posts/nrf-connect-sdk-tutorial---part-2-ncs-v1-4-0 shows how to config GPIO for PWM on nRF9160DK and nRF5340 PDK, but the same concept can apply to nRF52840DK. You also could search for similar use cases on Devzone.
If you want to use GPIOs independently from any peripheral, you can also use the nrfx GPIO HAL functions directly in the code without setting .overlay or .config as
#include <nrfx/hal/nrf_gpio.h> #define OUTPUT_PIN 16 void main(void) { nrf_gpio_cfg_output(OUTPUT_PIN); nrf_gpio_pin_clear(OUTPUT_PIN); }
-Amanda H.
Hi Samuel,
Not sure what exactly you want to use the GPIO configuration for.
This tutorial https://devzone.nordicsemi.com/nordic/nrf-connect-sdk-guides/b/getting-started/posts/nrf-connect-sdk-tutorial---part-2-ncs-v1-4-0 shows how to config GPIO for PWM on nRF9160DK and nRF5340 PDK, but the same concept can apply to nRF52840DK. You also could search for similar use cases on Devzone.
If you want to use GPIOs independently from any peripheral, you can also use the nrfx GPIO HAL functions directly in the code without setting .overlay or .config as
#include <nrfx/hal/nrf_gpio.h> #define OUTPUT_PIN 16 void main(void) { nrf_gpio_cfg_output(OUTPUT_PIN); nrf_gpio_pin_clear(OUTPUT_PIN); }
-Amanda H.
hi Amanda H,
thanks for reply.
in #define OUTPUT_PIN 16.
what is mean by 16.
if its pin then what is port.
thanks,
samuel kapa