Skip to content

Checking if UARTE TX complete on nRF52 #13306

@tautologyclub

Description

@tautologyclub

Describe the bug
Function uart_irq_tx_complete does not work as intended. I want to use it to check if it's safe to turn off power to the device connected to UART (an RS485 transceiver in this case), which I can only do if I'm sure all bytes has been transmitted successfully. But uart_irq_tx_complete doesn't seem to help me here. From uart_nrfx_uarte.c:

.irq_tx_ready		= uarte_nrfx_irq_tx_ready_complete,
.irq_tx_complete	= uarte_nrfx_irq_tx_ready_complete,

So tx_complete will actually only check if uart controller is ready to accept new bytes. To me, this doesn't seem to be equivalent. If I were to shut off power to the RS485 transceiver just because tx_complete returned TRUE, I am pretty convinced I would drop bytes.

Metadata

Metadata

Assignees

Labels

area: UARTUniversal Asynchronous Receiver-TransmitterbugThe issue is a bug, or the PR is fixing a bugplatform: nRFNordic nRFx

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions