drivers: serial: nrf_sw_lpuart: Fix case of flushing RX FIFO - #27571
Conversation
CI InformationTo view the history of this post, click the 'edited' button above Inputs:Sources:sdk-nrf: PR head: 54774d3ab30009f63b567f37af8c6ad599266e4b more detailssdk-nrf:
Github labels
List of changed files detected by CI (2)Outputs:ToolchainVersion: 53ac68dd62 Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
0752528 to
5ef3a18
Compare
5ef3a18 to
0275ac2
Compare
|
You can find the documentation preview for this PR here. Preview links for modified nRF Connect SDK documents: |
FrancescoSer
left a comment
There was a problem hiding this comment.
Approving but please implement this small suggestion
|
This pull request has been marked as stale because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 7 days. Note, that you can always re-open a closed pull request at any time. |
In Bluetooth HCI there is a case where uart_fifo_read is called not from the UART interrupt context. If that happens and there is pending UART data then LPUART was not able to reset the receiver as it remained in the blocked state. Case like that happens when HCI device sends data to the host core after host core got reset but before HCI device is reset by the host. Calling uart_fifo_read not from UART interrupt handler is a violation of the API but it has been used like that to drain UART FIFO for years and it has been useful so LPUART adapts to it. Case is fixed by triggering the UART interrupt if receiver is in blocked state. Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2e0a3ab to
54774d3
Compare
In Bluetooth HCI there is a case where uart_fifo_read is called not from the UART interrupt context. If that happens and there is pending UART that then LPUART was not able to reset the receiver. Case like that happend when HCI device sends data to the host core after host core got reset but before HCI device is reset by the host. Calling uart_fifo_read not from UART interrupt handler is a violation of the API but it has been used like that to drain UART FIFO for years and it has been useful so LPUART adapts to it.