mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-02 22:51:14 +00:00
fix(uart): LP UART does not have the pre-divider for its clock source
Closes https://github.com/espressif/esp-idf/issues/15427
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -53,7 +53,10 @@ static esp_err_t lp_core_uart_param_config(const lp_core_uart_cfg_t *cfg)
|
||||
}
|
||||
|
||||
/* Override protocol parameters from the configuration */
|
||||
lp_uart_ll_set_baudrate(hal.dev, cfg->uart_proto_cfg.baud_rate, sclk_freq);
|
||||
if (!lp_uart_ll_set_baudrate(hal.dev, cfg->uart_proto_cfg.baud_rate, sclk_freq)) {
|
||||
/* Unachievable baud rate */
|
||||
return ESP_FAIL;
|
||||
}
|
||||
uart_hal_set_parity(&hal, cfg->uart_proto_cfg.parity);
|
||||
uart_hal_set_data_bit_num(&hal, cfg->uart_proto_cfg.data_bits);
|
||||
uart_hal_set_stop_bits(&hal, cfg->uart_proto_cfg.stop_bits);
|
||||
|
Reference in New Issue
Block a user