uart: uart_param_config(748): Invalid src_clk

chikichaka
Posts: 14
Joined: Tue Aug 09, 2022 7:53 am

uart: uart_param_config(748): Invalid src_clk

Postby chikichaka » Mon Mar 13, 2023 1:41 am

Hello
My code was working well. But I could see this error after changing my board and IDF version as 5.0 from 4.4

Is it hardware problem or I have to change pin or uart configuration in my code?

My code:

Code: Select all

#define LPC_TXD_PIN (GPIO_NUM_17)
#define LPC_RXD_PIN (GPIO_NUM_18)
#define LPC_UART_NUM UART_NUM_0

void lpc_uart_init(void) {
    const uart_config_t uart_config = {
        .baud_rate = 115200,
        .data_bits = UART_DATA_8_BITS,
        .parity = UART_PARITY_DISABLE,
        .stop_bits = UART_STOP_BITS_1,
        .flow_ctrl = UART_HW_FLOWCTRL_DISABLE
    };

	uart_driver_install(LPC_UART_NUM, RX_BUF_SIZE * 2, 0, 0, NULL, 0);
	uart_param_config(LPC_UART_NUM, &uart_config);
	uart_set_pin(LPC_UART_NUM, LPC_TXD_PIN, LPC_RXD_PIN, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE);	
}

chikichaka
Posts: 14
Joined: Tue Aug 09, 2022 7:53 am

Re: uart: uart_param_config(748): Invalid src_clk

Postby chikichaka » Mon Mar 13, 2023 1:47 am

I change code like this and error is gone
const uart_config_t uart_config = {
.baud_rate = 115200,
.data_bits = UART_DATA_8_BITS,
.parity = UART_PARITY_DISABLE,
.stop_bits = UART_STOP_BITS_1,
.flow_ctrl = UART_HW_FLOWCTRL_DISABLE,
.source_clk = UART_SCLK_DEFAULT,
};

Who is online

Users browsing this forum: No registered users and 328 guests