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

NRF52833 DK Arduino pin mapping is incorrect

Hi teams,

Recently, during my test with some Arduino-Shield compatible daughter board with nRF52833DK, I found some pin mapping is incorrectly defined in nRF5 SDK.

The definition in pca10100.h is as follows.

#define ARDUINO_13_PIN              NRF_GPIO_PIN_MAP(1, 23)  // Digital pin 13
#define ARDUINO_12_PIN              NRF_GPIO_PIN_MAP(1, 22)  // Digital pin 12
#define ARDUINO_11_PIN              NRF_GPIO_PIN_MAP(1, 21)  // Digital pin 11
#define ARDUINO_10_PIN              NRF_GPIO_PIN_MAP(1, 20)  // Digital pin 10
#define ARDUINO_9_PIN               NRF_GPIO_PIN_MAP(1, 19)  // Digital pin 9
#define ARDUINO_8_PIN               NRF_GPIO_PIN_MAP(1, 17)  // Digital pin 8

But, these should be defined as below.

#define ARDUINO_13_PIN              NRF_GPIO_PIN_MAP(0, 23)  // Digital pin 13
#define ARDUINO_12_PIN              NRF_GPIO_PIN_MAP(0, 22)  // Digital pin 12
#define ARDUINO_11_PIN              NRF_GPIO_PIN_MAP(0, 21)  // Digital pin 11
#define ARDUINO_10_PIN              NRF_GPIO_PIN_MAP(0, 20)  // Digital pin 10
#define ARDUINO_9_PIN               NRF_GPIO_PIN_MAP(0, 19)  // Digital pin 9
#define ARDUINO_8_PIN               NRF_GPIO_PIN_MAP(0, 17)  // Digital pin 8

I compared with nRFConnect SDK, but it defines them correctly, but in nRF5 SDK, these definitions never changed from the beginning, and definitely incorrect.

Is this just bug, or for some other reason ?

Related