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: uart_max32: Add asynchronous mode support #84126

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

Conversation

ttmut
Copy link
Collaborator

@ttmut ttmut commented Jan 17, 2025

Add asynchronous mode support for MAX32 UART driver. Enable tests for several MAX32 boards.

@zephyrbot zephyrbot added platform: ADI Analog Devices, Inc. area: UART Universal Asynchronous Receiver-Transmitter labels Jan 17, 2025
Copy link
Member

@dcpleung dcpleung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make sure to use #ifdef or #if defined() for kconfigs.

drivers/serial/uart_max32.c Outdated Show resolved Hide resolved
drivers/serial/uart_max32.c Outdated Show resolved Hide resolved
drivers/serial/uart_max32.c Outdated Show resolved Hide resolved
drivers/serial/uart_max32.c Outdated Show resolved Hide resolved
drivers/serial/uart_max32.c Outdated Show resolved Hide resolved
drivers/serial/uart_max32.c Outdated Show resolved Hide resolved
drivers/serial/uart_max32.c Outdated Show resolved Hide resolved
drivers/serial/uart_max32.c Outdated Show resolved Hide resolved
drivers/serial/uart_max32.c Outdated Show resolved Hide resolved
drivers/serial/uart_max32.c Outdated Show resolved Hide resolved
ttmut added 3 commits January 17, 2025 21:09
This commit adds asynchronous mode support to MAX32 UART driver. Each
direction uses a single DMA channel that is assigned in devicetree
configuration.

Asynchronous mode also depends on interrupts to refresh receive
timeouts.

Signed-off-by: Tahsin Mutlugun <[email protected]>
When using asynchronous API, transfer will fail if the source buffer is
located in a region that cannot be accessed by DMA. This could happen
when a buffer is declared const, and placed in flash memory, for
example.

Workaround this problem by loading the data into a set of temporary
caches before passing them to DMA.

Signed-off-by: Tahsin Mutlugun <[email protected]>
Support following boards in asynchronous UART tests:

- MAX32655EVKIT
- MAX32655FTHR
- MAX32666EVKIT
- MAX32666FTHR
- MAX32670EVKIT
- MAX32690EVKIT

Signed-off-by: Tahsin Mutlugun <[email protected]>
Copy link
Member

@MaureenHelm MaureenHelm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Twister failure on the hifive_unleashed board looks unrelated

@kartben
Copy link
Collaborator

kartben commented Jan 17, 2025

Twister failure on the hifive_unleashed board looks unrelated

Ya, that test is flaky. I've just re-run the failed job, this should do the trick

@kartben
Copy link
Collaborator

kartben commented Jan 18, 2025

this should do the trick

... and it did

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: UART Universal Asynchronous Receiver-Transmitter platform: ADI Analog Devices, Inc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants