boards: reel_board: enable pull-up on UART RX pin
Enable pull-up on UART RX pin to reduce power consumption. If the board is powered by battery and the debugger is not connected via USB to the host, the SoC consumes up to 2mA more than expected. The consumption increases because RX pin is floating (High-Impedance state of pin B from Dual-Supply Bus Transceiver). Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This commit is contained in:
parent
f9e73c90f2
commit
b5b728495b
|
@ -24,6 +24,20 @@ static int board_reel_board_init(struct device *dev)
|
|||
|
||||
gpio->OUTSET = BIT(PERIPH_PON_PIN);
|
||||
|
||||
/*
|
||||
* Enable pull-up on UART RX pin to reduce power consumption.
|
||||
* If the board is powered by battery and the debugger is
|
||||
* not connected via USB to the host, the SoC consumes up
|
||||
* to 2mA more than expected.
|
||||
* The consumption increases because RX pin is floating
|
||||
* (High-Impedance state of pin B from Dual-Supply Bus Transceiver).
|
||||
*/
|
||||
gpio = NRF_P0;
|
||||
gpio->PIN_CNF[DT_NORDIC_NRF_UART_0_RX_PIN] =
|
||||
(GPIO_PIN_CNF_INPUT_Disconnect << GPIO_PIN_CNF_INPUT_Pos) |
|
||||
(GPIO_PIN_CNF_PULL_Pullup << GPIO_PIN_CNF_PULL_Pos) |
|
||||
(GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue