Skip to content
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

drivers: uart_nrf_sw_lpuart: Fix interrupt driven case #14609

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nordic-krch
Copy link
Contributor

Driver was calling isr function from unknown context when uart_irq_[rx,tx]_enable was called. It could lead to failures because driver assumes that isr function won't be interrupt by the same isr function.

A solution proposed here is to use k_timer handler context which is called from RTC1 interrupt context. Assert is ensuring that RTC1 and UART interrupt priorities are the same. Timer is called from the shortest possible timeout and from that context isr function is called.

@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Mar 22, 2024
@nordic-krch nordic-krch marked this pull request as ready for review April 2, 2024 08:29
@nordic-krch nordic-krch requested a review from anangl as a code owner April 2, 2024 08:29
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Apr 2, 2024

Test specification

CI/Jenkins/NRF

  • Integration Platforms

CI/Jenkins/integration

Test Module File based changes Manually selected West overwrite

Detailed information of selected test modules

Note: This message is automatically posted and updated by the CI

Copy link

github-actions bot commented Jul 6, 2024

This pull request has been marked as stale because it has been open (more than) 60 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 14 days. Note, that you can always re-open a closed pull request at any time.

Copy link

This pull request has been marked as stale because it has been open (more than) 60 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 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label Oct 16, 2024
@github-actions github-actions bot closed this Nov 6, 2024
@nordic-krch nordic-krch reopened this Nov 19, 2024
@nordic-krch nordic-krch requested a review from a team as a code owner November 19, 2024 09:36
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Nov 19, 2024

CI Information

To view the history of this post, clich the 'edited' button above
Build number: 7

Inputs:

Sources:

sdk-nrf: PR head: 830ab843063f42081c1496aff80173c99072f908

more details

sdk-nrf:

PR head: 830ab843063f42081c1496aff80173c99072f908
merge base: 193434541373f44df977543b5f568bcd9a41a2cb
target head (main): 193434541373f44df977543b5f568bcd9a41a2cb
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (1)
drivers
│  ├── serial
│  │  │ uart_nrf_sw_lpuart.c

Outputs:

Toolchain

Version:
Build docker image:

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • 🟠 Toolchain
  • 🟠 Build twister
  • 🟠 Integration tests
Disabled integration tests
    • desktop52_verification
    • doc-internal
    • test_ble_nrf_config
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_mesh
    • test-fw-nrfconnect-ble_samples
    • test-fw-nrfconnect-boot
    • test-fw-nrfconnect-chip
    • test-fw-nrfconnect-fem
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • test-fw-nrfconnect-nrf-iot_lwm2m
    • test-fw-nrfconnect-nrf-iot_mosh
    • test-fw-nrfconnect-nrf-iot_nrf_provisioning
    • test-fw-nrfconnect-nrf-iot_positioning
    • test-fw-nrfconnect-nrf-iot_samples
    • test-fw-nrfconnect-nrf-iot_serial_lte_modem
    • test-fw-nrfconnect-nrf-iot_thingy91
    • test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • test-fw-nrfconnect-nrf_crypto
    • test-fw-nrfconnect-rpc
    • test-fw-nrfconnect-rs
    • test-fw-nrfconnect-tfm
    • test-fw-nrfconnect-thread
    • test-fw-nrfconnect-zigbee
    • test-low-level
    • test-sdk-audio
    • test-sdk-dfu
    • test-sdk-find-my
    • test-sdk-mcuboot
    • test-sdk-pmic-samples
    • test-sdk-sidewalk
    • test-sdk-wifi
    • test-secdom-samples-public

Note: This message is automatically posted and updated by the CI

@nordic-krch
Copy link
Contributor Author

@anangl can you take a look?

Driver was calling isr function from unknown context when
uart_irq_[rx,tx]_enable was called. It could lead to failures
because driver assumes that isr function won't be interrupt
by the same isr function.

A solution proposed here is to use k_timer handler context
which is called from RTC1 interrupt context. Assert is
ensuring that RTC1 and UART interrupt priorities are the same.
Timer is called from the shortest possible timeout and from
that context isr function is called.

Signed-off-by: Krzysztof Chruściński <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants