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

GPIOTE config relate to pin numer on NRF52832-DK

Hi there,

First of all, I'm pretty new to this, so next question might be obvious to others.

I try to decipher a line of code, and the little Part is what puzzles me, so maybe someone can explain this.

Case: 

I uploaded some code that I found to my DK and when I press Button 4 (P0.16) things happen as they should, but I can find out why.

Since the code underneath points to P0.16, my guess is that  0x31001 point to some settings including P0.16. 

I traced it back to http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Fgpiote.html&cp=2_1_0_20_3_2&anchor=register.CONFIG-0

But here my knowledge ends.

Question: (how) Can I change the code below from P0.16 to P0.06?

//Configure GPIOTE
// Toggle Event; Pin P0.16; Event Mode //So, any pin change on P0.16 will trigger an event. //On the Nordic nRF52 DK, Pin 0.16 is a button.
NRF_GPIOTE->CONFIG[0]=0x31001;

Parents Reply Children
No Data
Related