I have an application where I need and interrupt when the SPI SS signal of a SPI slave is asserted.
Searching suggests that setting the SS pin to -1 is the way to go to achieve this:
Code: Select all
spi_slave_interface_config_t slvcfg = {
.mode = 1,
.spics_io_num = -1,
.queue_size = 1,
.flags = 0,
.post_setup_cb = userPostSetupCallback,
.post_trans_cb = userTransactionCallback,
};
Code: Select all
gpio_config_t gpio_configuration;
memset(&gpio_configuration, 0, sizeof(gpio_configuration));
gpio_configuration.intr_type = GPIO_INTR_NEGEDGE;
gpio_configuration.pin_bit_mask = (1ULL << SPI_SS_PIN);
gpio_configuration.mode = GPIO_MODE_INPUT;
gpio_configuration.pull_down_en = GPIO_PULLDOWN_DISABLE;
gpio_configuration.pull_up_en = GPIO_PULLUP_DISABLE;
err = gpio_config(&gpio_configuration);
So, how does one achieve the goal of getting an interrupt from the SPI SS signal?
Sid