feat(uart): Add sdkconfig.ci.iram_safe test for UART driver

This commit is contained in:
Song Ruo Jing
2023-08-29 12:25:05 +08:00
parent abc89df287
commit 767698b90d
20 changed files with 86 additions and 38 deletions

View File

@@ -0,0 +1,11 @@
menu "UART Configuration"
config UART_ISR_IN_IRAM
bool "Place UART ISR function into IRAM"
depends on !RINGBUF_PLACE_ISR_FUNCTIONS_INTO_FLASH
default n
help
If this option is not selected, UART interrupt will be disabled for a long time and
may cause data lost when doing spi flash operation.
endmenu # UART Configuration

View File

@@ -0,0 +1,5 @@
[mapping:uart_hal]
archive: libhal.a
entries:
if UART_ISR_IN_IRAM = y:
uart_hal_iram (noflash)

View File

@@ -355,7 +355,7 @@ esp_err_t uart_get_hw_flow_ctrl(uart_port_t uart_num, uart_hw_flowcontrol_t *flo
esp_err_t UART_ISR_ATTR uart_clear_intr_status(uart_port_t uart_num, uint32_t clr_mask)
{
ESP_RETURN_ON_FALSE((uart_num < UART_NUM_MAX), ESP_FAIL, UART_TAG, "uart_num error");
ESP_RETURN_ON_FALSE_ISR((uart_num < UART_NUM_MAX), ESP_FAIL, UART_TAG, "uart_num error");
uart_hal_clr_intsts_mask(&(uart_context[uart_num].hal), clr_mask);
return ESP_OK;
}