spi: change linker file let spi hal able to out from iram

This commit is contained in:
wanlei
2023-04-03 11:01:12 +08:00
parent 40b0dbae10
commit f61e219667
5 changed files with 22 additions and 2 deletions
+2
View File
@@ -86,6 +86,7 @@ menu "Driver Configurations"
bool "Place SPI master ISR function into IRAM"
default y
select PERIPH_CTRL_FUNC_IN_IRAM
select HAL_SPI_MASTER_FUNC_IN_IRAM
help
Place the SPI master ISR in to IRAM to avoid possible cache miss.
@@ -109,6 +110,7 @@ menu "Driver Configurations"
bool "Place SPI slave ISR function into IRAM"
default y
select PERIPH_CTRL_FUNC_IN_IRAM
select HAL_SPI_SLAVE_FUNC_IN_IRAM
help
Place the SPI slave ISR in to IRAM to avoid possible cache miss.
+13
View File
@@ -90,4 +90,17 @@ menu "Hardware Abstraction Layer (HAL) and Low Level (LL)"
but you will lose the possibility to debug this module, and some new
features will be added and bugs will be fixed in the IDF source
but cannot be synced to ROM.
config HAL_SPI_MASTER_FUNC_IN_IRAM
bool
depends on SPI_MASTER_ISR_IN_IRAM
help
Enable this option to place SPI master hal layer functions into IRAM.
config HAL_SPI_SLAVE_FUNC_IN_IRAM
bool
depends on SPI_SLAVE_ISR_IN_IRAM
help
Enable this option to place SPI slave hal layer functions into IRAM.
endmenu
+4 -2
View File
@@ -8,8 +8,10 @@ entries:
if IDF_TARGET_ESP32 = n && APP_BUILD_TYPE_PURE_RAM_APP = n:
cache_hal (noflash)
if SOC_GPSPI_SUPPORTED = y:
spi_hal_iram (noflash)
spi_slave_hal_iram (noflash)
if HAL_SPI_MASTER_FUNC_IN_IRAM = y:
spi_hal_iram (noflash)
if HAL_SPI_SLAVE_FUNC_IN_IRAM = y:
spi_slave_hal_iram (noflash)
if UART_ISR_IN_IRAM = y || ESP_PANIC_HANDLER_IRAM = y:
uart_hal_iram (noflash)
else: