Skip to content

Conversation

@nordic-krch
Copy link
Contributor

@nordic-krch nordic-krch commented Feb 18, 2025

Support for faster baudrates.

…baudrate enum

Add faster baudrates (2M, 4M and 8M).

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit e737895)
Rename UARTE_ANY_FAST to UARTE_ANY_FAST_PD. There are 2 types of
'fast' UARTE instances. In nrf54h20 instance uart120 is in fast
power domain that requires additional power and clock management
of that domain. In nrf54lx fast uart00 instance does not require
that. Add _PD to indicate fast power domain.

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit 1573be5)
…udrates

nrf54x devices have UARTE instance capable of using baudrate higher
than 1M. Higher baudrates does not have predefined values for
BAUDRATE register. A formula can be used to calculate BAUDRATE
value that shall be used for desired baudrate. Add UARTE_ANY_HIGH_SPEED
macro which is set when high speed is enabled (uart00 in nrf54lx or
uart120 in nrf54h20). For high speed instance use formula for getting
value that shall be written to BAUDRATE register.

When runtime configuration is not used then same formula is used to
calculate fixed BAUDRATE value.

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit 972ec82)
Fast instance in nrf54h (uart120) can generate a spurious RXTO event
some time after RXTO event that indicates that RX path is disabled.
The time when event is generated depends on baudrate and when slower
baudrates are used peripheral is disabled on time to not notice it
in the test but with higher baudates issue become visible. In order
to avoid spurious interrupt, RXTO interrupt is disabled during RXTO
event handling and enabled when RX is enabled. This workaround is
applied only for fast instance to avoid unnecessary register
accesses for slower instances.

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit e235e7b)
…abort test

Test was staring a TX transfer and aborting it after 300 us from
the timer handler. Test was assuming that ongoing transfer will
not finish in those 300 us. This might not be true for higher
baudrates. Instead of using fixed timeout, a value is calculated
from the baudrate and targets to abort the transfer after approx.
20 bytes of 95 byte long transfer.

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit 38c129d)
…rf54h20dk uart120

Use high baudrate when testing uart120 on nrf54h20dk/nrf54h20/cpuapp.

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit fe6a4d0)
@nordicjm nordicjm merged commit 80cc531 into nrfconnect:main Feb 18, 2025
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants