Skip to content
Snippets Groups Projects
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 !477
parents 01dab506 cfb7e96d
No related branches found
No related tags found
1 merge request!477change(uart): Use low power HIRC8 for uart clock
Pipeline #5244 passed
...@@ -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;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment