Commit cfb7e96d authored by schneider's avatar schneider
Browse files

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

parent 01dab506
Pipeline #5231 passed with stages
in 29 seconds
...@@ -65,7 +65,7 @@ const uart_cfg_t uart_cfg = { ...@@ -65,7 +65,7 @@ const uart_cfg_t uart_cfg = {
.flow = UART_FLOW_CTRL_DIS, .flow = UART_FLOW_CTRL_DIS,
.pol = UART_FLOW_POL_DIS, .pol = UART_FLOW_POL_DIS,
.baud = CONSOLE_BAUD, .baud = CONSOLE_BAUD,
.clksel = UART_CLKSEL_SYSTEM .clksel = UART_CLKSEL_ALTERNATE
}; };
const sys_cfg_uart_t uart_sys_cfg = { const sys_cfg_uart_t uart_sys_cfg = {
...@@ -117,6 +117,8 @@ int Console_Init(void) ...@@ -117,6 +117,8 @@ int Console_Init(void)
{ {
int err; int err;
SYS_ClockSourceEnable(SYS_CLOCK_HIRC8);
if ((err = UART_Init(ConsoleUart, &uart_cfg, &uart_sys_cfg)) != E_NO_ERROR) { if ((err = UART_Init(ConsoleUart, &uart_cfg, &uart_sys_cfg)) != E_NO_ERROR) {
return err; return err;
} }
...@@ -133,6 +135,8 @@ int Console_Shutdown(void) ...@@ -133,6 +135,8 @@ int Console_Shutdown(void)
return err; return err;
} }
SYS_ClockSourceDisable(SYS_CLOCK_HIRC8);
return E_NO_ERROR; 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