Skip to content

Reset UART on deinit, reduces power consumption on nRF #8089

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 20, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
formatting
  • Loading branch information
furbrain committed Jun 17, 2023
commit 4bb475b930d4237f09f26ac3a6f841fbd690d026
2 changes: 1 addition & 1 deletion ports/nrf/common-hal/busio/UART.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ bool common_hal_busio_uart_deinited(busio_uart_obj_t *self) {
}

void common_hal_busio_uart_deinit(busio_uart_obj_t *self) {
volatile uint32_t *power_cycle = (void*)(self->uarte->p_reg) + 0xFFC;
volatile uint32_t *power_cycle = (void *)(self->uarte->p_reg) + 0xFFC;
if (!common_hal_busio_uart_deinited(self)) {
nrfx_uarte_rx_abort(self->uarte);
nrfx_uarte_tx_abort(self->uarte);
Expand Down