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

(nRF52 DK) Why do GPIO 8 and 20 read ~1.5V and ~2.6V with no firmware flashed, just nRF52 DK powered on?

I need to use pin 8 and pin 20 as outputs on the nRF52 DK, to be transferred to a custom board built with the nRF52810. I'm using SDK v15.x.x.

I need to drive PWM output through pin 20, and a simple digital HIGH/LOW from pin 8. I need to do so in a program that utilizes the SAADC and PWM peripherals, extended from the uart_example within the SDK (Nordic UART Service example). Upon using a scope I see that pins are not initialized to 0 volts while running the program. To debug, I erased all firmware from the nRF52 DK but still read 1.5V and 2.6V form pin 8 and 20 respectively. 

Within my program, I've already added "CUSTOM_BOARD" and "CONFIG_NFCT_PINS_AS_GPIOS" to preprocessor definitions.  I've also changed the UART RTS/CTS/RX/TX pin assignments to free up pins 8 and 20. When I scope on any other pins, for example 11 and 12 or 13 and 14, I see they are initialized to 0V and I can run my PWM functions correctly. When I change pin assignment to port 8 and 20, the pins have strange initial voltages and I need them to start at zero as well.

Here are my current preprocessor definitions:

BOARD_PCA10040

DEVELOP_IN_NRF52832

FLOAT_ABI_SOFT

INITIALIZE_USER_SECTIONS

NO_VTOR_CONFIG

NRF52810_XXAA

NRF52_PAN_74

NRF_SD_BLE_API_VERSION=6

S112

SOFTDEVICE_PRESENT

SWI_DISABLE0

DEBUG

CONFIG_NFCT_PINS_AS_GPIOS

CUSTOM_BOARD

I know that the PWM and GPIO work with other pins so the functions I have written are correct. I'm also using other GPIO pins on the board for other processes. I believe there must be some kind of hidden configuration somewhere I need to enable/disable to properly work with PO.08 and PO.20. Can anybody help me out?

Related