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

P0.09 and P0.10 as GPIO (nRF52832 + IAR + custom board)

Hello, 

I know this issue has been discussed extensively in different posts, and I believe I read all of them, but still I can't get it working. 

I'm trying to drive three LEDs on pins P0.09, P0.10 and P0.11 of an nRF52832 on a custom board, using IAR as IDE. The LED connected to PIN 11 works fine, but the others don't. I understand these two are pins dedicated to the NFC functionality, and they require the last bit of NFCPINS to be set to 0 if you want to run them as GPIO. 

(I know if using the DK, there is a HW issue regarding a couple of missing resistors, but that's not my concern since I am using my own board, and PINS 9 and 10 are connected directly to the LEDs circuit.)

I tried to add this line of code in "uicr_config.h":

const uint32_t UICR_ADDR_0x20C    __attribute__((at(0x1000120C))) __attribute__((used)) = 0xFFFFFFFE;

But it didn't solve the problem. Besides, I'm getting a warning about the "at" attribute, but maybe that's not an issue, since it's actually not an error...(?)

I have included the "uicr_config.h" file in my libraries and I have defined "CONFIG_NFCT_PINS_AS_GPIOS" in my "main.c", but no luck yet. 

Can anyone suggest other things to try, please? 

Many thanks! 

Related