From cfed7c84cea2db61f835fa8761b4a76eeab3421a Mon Sep 17 00:00:00 2001 From: "Michael (XIAO Xufeng)" Date: Mon, 20 Aug 2018 18:27:38 +0800 Subject: [PATCH] spi: fix the issue that spi cannot be used when flash is disabled The dma configuration function called in the ISR should be put into the IRAM. Fixes https://github.com/espressif/esp-idf/issues/2307. --- components/driver/spi_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/driver/spi_common.c b/components/driver/spi_common.c index 89d1f8c017..ad51379a84 100644 --- a/components/driver/spi_common.c +++ b/components/driver/spi_common.c @@ -344,7 +344,7 @@ void spicommon_cs_free(spi_host_device_t host, int cs_io_num) } //Set up a list of dma descriptors. dmadesc is an array of descriptors. Data is the buffer to point to. -void spicommon_setup_dma_desc_links(lldesc_t *dmadesc, int len, const uint8_t *data, bool isrx) +void IRAM_ATTR spicommon_setup_dma_desc_links(lldesc_t *dmadesc, int len, const uint8_t *data, bool isrx) { int n = 0; while (len) {