mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
spi_slave: fix issue iram flag bind with iram config
bus flag`ESP_INTR_FLAG_IRAM` bind with `CONFIG_SPI_SLAVE_ISR_IN_IRAM`
This commit is contained in:
parent
5297dd2c10
commit
aff223276f
@ -116,11 +116,7 @@ typedef struct {
|
||||
static void ipc_isr_reg_to_core(void *args)
|
||||
{
|
||||
spi_slave_t *host = ((spi_ipc_param_t *)args)->host;
|
||||
int flags = host->intr_flags | ESP_INTR_FLAG_INTRDISABLED;
|
||||
#ifdef CONFIG_SPI_SLAVE_ISR_IN_IRAM
|
||||
flags |= ESP_INTR_FLAG_IRAM;
|
||||
#endif
|
||||
*((spi_ipc_param_t *)args)->err = esp_intr_alloc(spicommon_irqsource_for_host(host->id), flags, spi_intr, (void *)host, &host->intr);
|
||||
*((spi_ipc_param_t *)args)->err = esp_intr_alloc(spicommon_irqsource_for_host(host->id), host->intr_flags | ESP_INTR_FLAG_INTRDISABLED, spi_intr, (void *)host, &host->intr);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -235,11 +231,7 @@ esp_err_t spi_slave_initialize(spi_host_device_t host, const spi_bus_config_t *b
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
int flags = bus_config->intr_flags | ESP_INTR_FLAG_INTRDISABLED;
|
||||
#ifdef CONFIG_SPI_SLAVE_ISR_IN_IRAM
|
||||
flags |= ESP_INTR_FLAG_IRAM;
|
||||
#endif
|
||||
err = esp_intr_alloc(spicommon_irqsource_for_host(host), flags, spi_intr, (void *)spihost[host], &spihost[host]->intr);
|
||||
err = esp_intr_alloc(spicommon_irqsource_for_host(host), bus_config->intr_flags | ESP_INTR_FLAG_INTRDISABLED, spi_intr, (void *)spihost[host], &spihost[host]->intr);
|
||||
}
|
||||
if (err != ESP_OK) {
|
||||
ret = err;
|
||||
|
@ -480,6 +480,7 @@ static IRAM_ATTR void test_slave_iram_post_trans_cbk(spi_slave_transaction_t *cu
|
||||
static IRAM_ATTR void test_slave_isr_iram(void)
|
||||
{
|
||||
spi_bus_config_t bus_cfg = SPI_BUS_TEST_DEFAULT_CONFIG();
|
||||
bus_cfg.intr_flags |= ESP_INTR_FLAG_IRAM;
|
||||
spi_slave_interface_config_t slvcfg = SPI_SLAVE_TEST_DEFAULT_CONFIG();
|
||||
slvcfg.flags = SPI_SLAVE_NO_RETURN_RESULT;
|
||||
slvcfg.queue_size = 16;
|
||||
@ -561,6 +562,7 @@ static IRAM_ATTR void test_trans_in_isr_post_trans_cbk(spi_slave_transaction_t *
|
||||
static IRAM_ATTR void spi_slave_trans_in_isr(void)
|
||||
{
|
||||
spi_bus_config_t bus_cfg = SPI_BUS_TEST_DEFAULT_CONFIG();
|
||||
bus_cfg.intr_flags |= ESP_INTR_FLAG_IRAM;
|
||||
spi_slave_interface_config_t slvcfg = SPI_SLAVE_TEST_DEFAULT_CONFIG();
|
||||
slvcfg.flags = SPI_SLAVE_NO_RETURN_RESULT;
|
||||
slvcfg.queue_size = 16;
|
||||
@ -647,6 +649,7 @@ static IRAM_ATTR void test_queue_reset_in_isr_post_trans_cbk(spi_slave_transacti
|
||||
static IRAM_ATTR void spi_queue_reset_in_isr(void)
|
||||
{
|
||||
spi_bus_config_t bus_cfg = SPI_BUS_TEST_DEFAULT_CONFIG();
|
||||
bus_cfg.intr_flags |= ESP_INTR_FLAG_IRAM;
|
||||
spi_slave_interface_config_t slvcfg = SPI_SLAVE_TEST_DEFAULT_CONFIG();
|
||||
slvcfg.flags = SPI_SLAVE_NO_RETURN_RESULT;
|
||||
slvcfg.queue_size = 16;
|
||||
|
Loading…
x
Reference in New Issue
Block a user