Merge branch 'bugfix/reset_some_peripherals_when_cpu_start' into 'master'

driver:   Reset  communication peripherals when cpu start up.

See merge request idf/esp-idf!2296
This commit is contained in:
Angus Gratton
2018-05-21 09:53:42 +08:00
2 changed files with 23 additions and 19 deletions

View File

@@ -651,6 +651,9 @@ esp_err_t uart_param_config(uart_port_t uart_num, const uart_config_t *uart_conf
r = uart_set_tx_idle_num(uart_num, UART_TX_IDLE_NUM_DEFAULT);
if (r != ESP_OK) return r;
r = uart_set_stop_bits(uart_num, uart_config->stop_bits);
//A hardware reset does not reset the fifo,
//so we need to reset the fifo manually.
uart_reset_rx_fifo(uart_num);
return r;
}