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: serial: nrfx_uarte: Add requesting of HSFLL GD clock when fast UARTE (uart120) is used #82103

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Commits on Dec 3, 2024

  1. drivers: serial: nrfx_uarte: Add support for non ISR PM mode

    When fast UARTE instance is used (e.g. UARTE120 in nrf54h20), PM actions
    are not ISR safe because they include communication over IPC so they can
    only be called from the thread context. Extend driver to support both
    PM modes. When non ISR mode is used then uart_rx_enable() and uart_tx()
    will return error if they are called from ISR and resume operation
    would need to be called because device is suspended. On completion,
    driver is calling pm_device_runtime_put_async which can be called from
    the ISR context.
    
    Additionally, suspending in the TXSTOPPED and RXTO events has been
    moved after user callback. It allows to support the case where
    uart_rx_enable() or uart_tx() are called from that callback context.
    Since suspending is called after returning from the callback it will
    not trigger suspend action because API called in the callback context
    will increment the usage counter (when pm_device_runtime_get() is
    called).
    
    Signed-off-by: Krzysztof Chruściński <[email protected]>
    nordic-krch committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    ec45cbf View commit details
    Browse the repository at this point in the history
  2. drivers: serial: nrfx_uarte: Request hsfll clock for fast instance

    Request fast global domain to run at 320 MHz during fast UARTE
    activity. As request is asynchronous it cannot be called from
    an ISR. Due to complexity to handle that without device runtime
    power management a requirement is added so that if fast UARTE
    is used device runtime PM must be enabled. Clock is request
    and released in PM resume and suspended actions which in case
    of fast UARTE are only called from thread context.
    
    Signed-off-by: Krzysztof Chruściński <[email protected]>
    nordic-krch committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    96fee4c View commit details
    Browse the repository at this point in the history
  3. tests: drivers: uart: async_api: nrf54h20dk: Enable device PM

    Enable device runtime PM for nrf54h20dk/nrf54h20/cpuapp where
    fast UARTE (uart120) is tested.
    
    Signed-off-by: Krzysztof Chruściński <[email protected]>
    nordic-krch committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    d634eee View commit details
    Browse the repository at this point in the history