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

Why nRF52832i NRF_GPIO->LATCH is always 0x600 when I pushed one of buttons usingGPIO pin9 and pin10 which are configured as GPIO?

Dear, 

       Firstly, I configured the GPIO pin 9 and pin10 as GPIO by defining the CONFIG_NFCT_PINS_AS_GPIOS in my project.

       And in my project, button1 uses GPIO pin 10 and button2 uses GPIO pin 9. Every time when nRF52832 in sleep mode, I push one of button1 and button 2 , the value of NRF_GPIO->LATCH is always 0x600. It confuse me and I can not understand which reason has resulted in.The following is my debug information.

(Because I find that even if I do not configure any wakeup key, any button can also wakeup nRF52832 after has called "buttons_leds_init( )" in "main( )" . So I do not configure the button1 and button2 as wakeup key in my project. )

   Which reasons have resulted in NRF_GPIO->LATCH always 0x600 when I only pushed one of different buttons using GPIO pin 9 and pin 10? I really want to know.

Parents
  • In the infocenter about the GPIO, the following is mentioned:

    "When a pin's PINx.DETECT signal goes high, a flag will be set in the LATCH register, e.g. when the PIN0.DETECT signal goes high, bit 0 in the LATCH register will be set to '1'."

    Thus, if pin 9 and 10 is pushed, respectively bit 9 and 10 should be set to 1. This results in the LATCH register being equal to 0b0000 0000 0000 0000 0000 0110 0000 0000. Converting this number into hexadecimal gives 0x600, which is what you got.

    Best regards,

    Simon.

  • Dear  Simon Iversen ,

              But actually you do not answer my question which I post before.

              The problem I encounterd is that when I only push one button to wakeup nRF52832, I found that the value of NRF_GPIO->LATCH always 0x600. And the value 0x600 means GPIO pin9 and pin10 both triggered  at the same time. But actually I only pushed one button using GPIO pin9 or pin10.

              In my project GPIO pin9 used for button2 and GPIO pin10 used for button1. And I also do many tests, everytime when I push only one button which is button1 or button2 to  wakeup nRF52832, I found that the value of NRF_GPIO->LATCH always 0x600. This makes me feel very confused.

  • If you look at the bottom of this link, you can see that pin 9 and 10 is partly connected together. You should also have CONFIG_NFCT_AS_GPIOS in processor defines, as described here.

Reply Children
Related