Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Properly configuring the GPIOs ?

Hello all, 

I am porting the code from the nrf52dk to the nrf52820 based module and so far so good!

However, I can blink the LED on certain pins while not on the others, so I am thinking, am I not doing something right, for example, the hardware has a proper, healthy connection.

Working on the nRF52DK and Segger with the nRF5SDK, the module PAN1781 is programmed ok via the SW .. all good, maned to program the blinky10100e example ...

Now, the other GPIO would like to be used, namely the F3 and F7 (see more here New Output (panasonic.de ) , but although the following code works, for example, I can change the GPIOs I cannot get the led blink!

#include <stdbool.h>
#include <stdint.h>
#include "nrf_delay.h"
#include "boards.h"

#define GPIO_LED_EXTERNAL 20  //my gpio
#define BLINK_DELAY 200


/**
 * @brief Function for application main entry.
 */
int main(void)
{
    /* Configure board. */
   nrf_gpio_cfg_output(GPIO_LED_EXTERNAL);

    /* Toggle LEDs. */
    while (true)
    {
      nrf_gpio_pin_toggle(GPIO_LED_EXTERNAL);
      nrf_delay_ms(BLINK_DELAY);
      printf("Blinking the led on pin: %d\n", GPIO_LED_EXTERNAL);
    }
}

I am wondering, if the GPIOs have to be defined differently? For example, I would like to put the TWI on some of those GPIOs... apropos TWI, I have tried to use the GPIOs where the led can be blinked for the TWI namely scl and sda, but cannot get it to work, otherwise the code compiles ok, and it was ported from the nrf52dk where all seamlessly work.

Any Ideas?

Best.

Related