Commit e3a22247 authored by Rahix's avatar Rahix
Browse files

Merge branch 'schneider/hirc8-uart' into 'master'

change(uart): Use low power HIRC8 for uart clock

See merge request card10/firmware!477
parents 01dab506 cfb7e96d
Pipeline #5244 passed with stages
in 1 minute and 22 seconds
......@@ -65,7 +65,7 @@ const uart_cfg_t uart_cfg = {
.flow = UART_FLOW_CTRL_DIS,
.pol = UART_FLOW_POL_DIS,
.baud = CONSOLE_BAUD,
.clksel = UART_CLKSEL_SYSTEM
.clksel = UART_CLKSEL_ALTERNATE
};
const sys_cfg_uart_t uart_sys_cfg = {
......@@ -117,6 +117,8 @@ int Console_Init(void)
{
int err;
SYS_ClockSourceEnable(SYS_CLOCK_HIRC8);
if ((err = UART_Init(ConsoleUart, &uart_cfg, &uart_sys_cfg)) != E_NO_ERROR) {
return err;
}
......@@ -133,6 +135,8 @@ int Console_Shutdown(void)
return err;
}
SYS_ClockSourceDisable(SYS_CLOCK_HIRC8);
return E_NO_ERROR;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment