Trying to run the SPI Master application on a custom nrf52382 based device (custom PCB) to communicate with an ADC chip that is taking analog values from a Multiplexer. Not using any softdevice, using SDK 15.1, NRF52382, environment is uVision Keil 5.0, and I am programming the custom board through an NRF Development kit.
Problem is, there are some pins that I cannot seem to set or clear (i.e. they are tied high or low permanently no matter what code or application I run). I observed that P0.21 is tied HIGH and the code I run does not change that (the pin stays at 3.3V and never gets back to floating even if left unprogrammed). Similarly, P0.6 is tied HIGH and P0.9 & P0.10 are tied LOW no matter what application is running on the board. If I leave these pins unprogrammed they don't have floating value but stay at respective HIGH and LOW states.

The GPIO pin assignments page on Nordic Infocenter (http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v12.2.0%2Fgroup__nrf__gpio.html&cp=4_0_1_6_6_7) says these pins can be used as general purpose I/O. P0.21 especially should be able to be configured as general output pin if I haven't configured it as Reset.


The following is my code. Any guidance as to where I am going wrong will be helpful. Is there a problem with the PCB? Thank you so much.
#define MYPIN 6
nrf_gpio_cfg_output(MYPIN);
nrf_gpio_pin_clear (MYPIN);
