Error: nrfx_gpiote_input_configure() failed, errCode=0xbad0002

The first calling nrfx_gpiote_input_configure() in afe4900.c is successful. But the second calling nrfx_gpiote_input_configure() in button.c is failed. 

What is meaning of errCode=0xbad0002? How can I fix this issue?

00> *** Booting Zephyr OS build v3.2.99-ncs2 ***

00> Starting button Test example
00> configure AFE4900_RDY pin as input
00> configure AFE4900_RESET pin as output
00> configure POWER_UP pin as output
00> configure LED_G pin as output
00> set POWER_UP pin
00> clear AFE4900_RESET pin, 0
00> set AFE4900_RESET pin
00> I2C: Device is ready.
00> 0x39 0x35 0x50
00> Starting button Test example
00> device_is_ready() ok
00> btInit() e
00> bt_passkey_set(123456)
00> _btReady(0) e
00> Bluetooth initialized
00> _btReady(0) x
00> btInit() x
00> device_is_ready() ok
00> Error: nrfx_gpiote_input_configure() failed for button, errCode=0xbad0002

Parents Reply Children
  • If I set CONFIG_DEBUG=n in prj.conf, there is no such issue. WhyCONFIG_DEBUG=y cause nrfx_gpiote_input_configure() failed?

    The following is log message of setting CONFIG_DEBUG=n.> *** Booting Zephyr OS build v3.2.99-ncs2 ***
    00> Starting button Test example
    00> configure AFE4900_RDY pin as input
    00> configure AFE4900_RESET pin as output
    00> configure POWER_UP pin as output
    00> configure LED_G pin as output
    00> set POWER_UP pin
    00> clear AFE4900_RESET pin, 0
    00> set AFE4900_RESET pin
    00> I2C: Device is ready.
    00> 0x39 0x35 0x50
    00> Starting button Test example
    00> device_is_ready() ok
    00> nrfx_gpiote_input_configure() okay for AFE4900_RDY
    00> btInit() e
    00> bt_passkey_set(123456)
    00> _btReady(0) e
    00> Bluetooth initialized
    00> _btReady(0) x
    00> btInit() x
    00> device_is_ready() ok
    00> nrfx_gpiote_input_configure() okay for button
    00> start a timer
    00> now-1-11-30 0:0:0
    00> 16
    00> 10016
    00> now-1-11-30 0:0:10
    00> val=1, BUTTON_PRESS=0
    00> 

Related