Is it possible to use sense edge mask on Sidewalk?

Hi, I am developing sidewalk application on nrf52840 and I want to lower power consumption. I enable the sense edge mask to all pins and found out the sx1262 dio1 interrupt is not working,my lora event are not receiving anything.

Is it possible to use sense edge mask on sx1262 or am I missing some setting?

&gpio1 {
    sense-edge-mask = < 0xffffffff >;
};
# Config Peripherals
CONFIG_GPIO=y
CONFIG_I2C=y
CONFIG_ADC=y
CONFIG_PWM=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_NVS=y
CONFIG_NVS_LOG_LEVEL_DBG=n
CONFIG_MPU_ALLOW_FLASH_WRITE=y
####

# Sidewalk
CONFIG_SIDEWALK=y
CONFIG_SIDEWALK_DFU=n
CONFIG_SIDEWALK_THREAD_PRIORITY=10

# Logs
CONFIG_SIDEWALK_LOG_LEVEL_INF=y

# Debug Logs
CONFIG_SIDEWALK_LOG_LEVEL_DBG=n
#CONFIG_SIDEWALK_CRYPTO_LOG_LEVEL_DBG=y
#CONFIG_SPI_BUS_LOG_LEVEL_DBG=y
#CONFIG_SPI_LOG_LEVEL_DBG=y
#CONFIG_LOG_DEFAULT_LEVEL=4

Parents
  • Hello,

    Is it possible to use sense edge mask on sx1262 or am I missing some setting?

    Could you give us some more details on what "sense edge mask" means? I am not aware of this. I have asked this internally, and it sounds like something unfamiliar to us.

    Kind Regards,

    Abhijith

  • The sense edge mask description:

    Mask of pins that use the GPIO sense mechanism for edge detection.
    Pins not included in the mask use GPIOTE channels in the event mode.

    github.com/.../nordic,nrf-gpio.yaml

    The code is implemented in zephyr/drivers/gpio/gpio_nrfx.c

        /* If edge mode is to be used and pin is not configured to use sense for
         * edge use IN event.
         */
        if (!(BIT(pin) & get_port_cfg(port)->edge_sense) &&
            (mode == GPIO_INT_MODE_EDGE) &&
            (nrf_gpio_pin_dir_get(abs_pin) == NRF_GPIO_PIN_DIR_INPUT)) {
            err = nrfx_gpiote_channel_get(abs_pin, &ch);
            if (err == NRFX_ERROR_INVALID_PARAM) {
                err = nrfx_gpiote_channel_alloc(&ch);
                if (err != NRFX_SUCCESS) {
                    return -ENOMEM;
                }
            }
    
            trigger_config.p_in_channel = &ch;
        }
    

Reply
  • The sense edge mask description:

    Mask of pins that use the GPIO sense mechanism for edge detection.
    Pins not included in the mask use GPIOTE channels in the event mode.

    github.com/.../nordic,nrf-gpio.yaml

    The code is implemented in zephyr/drivers/gpio/gpio_nrfx.c

        /* If edge mode is to be used and pin is not configured to use sense for
         * edge use IN event.
         */
        if (!(BIT(pin) & get_port_cfg(port)->edge_sense) &&
            (mode == GPIO_INT_MODE_EDGE) &&
            (nrf_gpio_pin_dir_get(abs_pin) == NRF_GPIO_PIN_DIR_INPUT)) {
            err = nrfx_gpiote_channel_get(abs_pin, &ch);
            if (err == NRFX_ERROR_INVALID_PARAM) {
                err = nrfx_gpiote_channel_alloc(&ch);
                if (err != NRFX_SUCCESS) {
                    return -ENOMEM;
                }
            }
    
            trigger_config.p_in_channel = &ch;
        }
    

Children
Related