diff --git a/arch/xtensa/src/esp32/esp32_i2c.c b/arch/xtensa/src/esp32/esp32_i2c.c index 28ecac715a..3eba10782a 100644 --- a/arch/xtensa/src/esp32/esp32_i2c.c +++ b/arch/xtensa/src/esp32/esp32_i2c.c @@ -1569,6 +1569,9 @@ FAR struct i2c_master_s *esp32_i2cbus_initialize(int port) return NULL; } + /* Set up to receive peripheral interrupts on the current CPU */ + + config->cpu = up_cpu_index(); up_disable_irq(priv->cpuint); esp32_attach_peripheral(config->cpu, config->periph, priv->cpuint); diff --git a/arch/xtensa/src/esp32/esp32_spi.c b/arch/xtensa/src/esp32/esp32_spi.c index 0175c01b2c..12d746d9ee 100644 --- a/arch/xtensa/src/esp32/esp32_spi.c +++ b/arch/xtensa/src/esp32/esp32_spi.c @@ -1473,6 +1473,9 @@ FAR struct spi_dev_s *esp32_spibus_initialize(int port) return NULL; } + /* Set up to receive peripheral interrupts on the current CPU */ + + priv->config->cpu = up_cpu_index(); up_disable_irq(priv->cpuint); esp32_attach_peripheral(priv->config->cpu, priv->config->periph, diff --git a/arch/xtensa/src/esp32/esp32_spi_slave.c b/arch/xtensa/src/esp32/esp32_spi_slave.c index e16b6453ea..0d13bece67 100644 --- a/arch/xtensa/src/esp32/esp32_spi_slave.c +++ b/arch/xtensa/src/esp32/esp32_spi_slave.c @@ -1306,6 +1306,9 @@ FAR struct spi_slave_ctrlr_s *esp32_spislv_ctrlr_initialize(int port) return NULL; } + /* Set up to receive peripheral interrupts on the current CPU */ + + priv->config->cpu = up_cpu_index(); up_disable_irq(priv->cpuint); esp32_attach_peripheral(priv->config->cpu, priv->config->periph,