Просмотр исходного кода

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.
Michael (XIAO Xufeng) 7 лет назад
Родитель
Сommit
e3557b57be
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      components/driver/spi_common.c

+ 1 - 1
components/driver/spi_common.c

@@ -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) {