]> granicus.if.org Git - esp-idf/commitdiff
spi: fix the issue that spi cannot be used when flash is disabled
authorMichael (XIAO Xufeng) <xiaoxufeng@espressif.com>
Mon, 20 Aug 2018 10:27:38 +0000 (18:27 +0800)
committerbot <bot@espressif.com>
Thu, 23 Aug 2018 05:21:49 +0000 (05:21 +0000)
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

index aa5495a8cf34b0e3fd03422c78ee47ff9c3e3be9..06873f934a55e92c74a93ae367c388b9520ca293 100644 (file)
@@ -330,7 +330,7 @@ void spicommon_cs_free_io(int cs_gpio_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) {