about 5340 gpiote issue

Hi.

i am using 5340 + ncs 2.0.2. and gpiote nrfx drvier.

i used gpiote for count encoder

encoder clock speed is about 2.5k and input pint is 2 gpiote pin.

gpiote polarity is toggle.

gpiote pin number : A is 46, B is 47

pin B (number 47) is working good. but pin A (number 46) is detect slow less a half speed than pin A.

last test, I used pin 22,36 it work.

is there some limit about pin 46?

under below, code and screenshot

nrfx_gpiote_in_config_t config =
        {
            .sense = NRF_GPIOTE_POLARITY_TOGGLE,
            .pull = NRF_GPIO_PIN_NOPULL,
            .is_watcher = false,
            .hi_accuracy = true,
            .skip_gpio_setup = false};
    err_code = nrfx_gpiote_in_init(A_PIN, &config, gpiote_handler);
    if (err_code != NRFX_SUCCESS)
    {
        LOG_INF("gpiote in init failed : %x", err_code);
        return;
    }
    err_code = nrfx_gpiote_in_init(B_PIN, &config, gpiote_handler);
    if (err_code != NRFX_SUCCESS)
    {
        LOG_INF("gpiote in init failed : %x", err_code);
        return;
    }
static void gpiote_handler(nrfx_gpiote_pin_t pin, nrf_gpiote_polarity_t action)
{
    if(pin == A_PIN)
    {
       ...
    }
    else
    {
        ...
    }
}

/cfs-file/__key/communityserver-discussions-components-files/4/2275.bmp

Related