Skip to content

Should there be a stdio_uart_deinit()? #810

@bruelltuete

Description

@bruelltuete

I would like to disable UART console output after running for a while. Idea is to dump boot diagnostics to console but once everything is up and running (say after 1 minute or so) I would like to disable UART output to save power running off batteries.
I'd call stdio_uart_deinit and then clock-off UART. My crusty amp meter says clock-off will save about 0.5mA.

Stumbled over #808 while trying this.

I got a related question: what is supposed to happen (wrt to printf) if I disable CLOCKS_WAKE_EN1_CLK_SYS_UART0_BITS and CLOCKS_WAKE_EN1_CLK_PERI_UART0_BITS? Somewhere down the call stack is a call to uart_write_blocking(). If the UART controller is not clocked, is there always space in the tx fifo?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions