mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 04:43:33 +00:00
feat(uart): Add sdkconfig.ci.iram_safe test for UART driver
This commit is contained in:
11
components/driver/uart/Kconfig.uart
Normal file
11
components/driver/uart/Kconfig.uart
Normal 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
|
5
components/driver/uart/linker.lf
Normal file
5
components/driver/uart/linker.lf
Normal file
@@ -0,0 +1,5 @@
|
||||
[mapping:uart_hal]
|
||||
archive: libhal.a
|
||||
entries:
|
||||
if UART_ISR_IN_IRAM = y:
|
||||
uart_hal_iram (noflash)
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user