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

cpu/nrf5x_common: clean up UART implementation #20111

Merged
merged 1 commit into from
Dec 10, 2023

Conversation

maribu
Copy link
Member

@maribu maribu commented Nov 27, 2023

Contribution description

The functions uart_poweron(), uart_poweroff() and uart_mode() can share code between the UART (UART without EasyDMA) and UARTE (UART with EasyDMA) implementations, so let's do that.

Testing procedure

UART should still work including switching modes - best checked with a logic analyzer attached to verify the output - for:

  • nRF5x with UART peripheral (UART without EasyDMA), so any nRF51*
  • nRF5x with UARTE peripheral (UART with EasyDMA) but no support for two stop bits, so e.g. nRF52832
  • nRF5x with UARTE peripheral (UART with EasyDMA) plus support for two stop bits, so e.g. nRF52840 / nRF53 / nRF9160 / ...

Issues/PRs references

Follow up to / made possible by #20102

@maribu maribu added State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation labels Nov 27, 2023
@github-actions github-actions bot added Platform: ARM Platform: This PR/issue effects ARM-based platforms Area: cpu Area: CPU/MCU ports labels Nov 27, 2023
The functions `uart_poweron()`, `uart_poweroff()` and  `uart_mode()`
can share code between the UART (UART without EasyDMA) and UARTE
(UART with EasyDMA) implementations, so let's do that.
@maribu maribu force-pushed the cpu/nrf5x_common/cleanup_uart branch from 1a7234a to 659ef97 Compare November 27, 2023 08:49
@maribu
Copy link
Member Author

maribu commented Nov 27, 2023

Using USEMODULE=stdio_rtt make BOARD=nrf52dk flash term in tests/periph/uart:

115200 Bd, 8E1

image

115200 Bd, 8N1

image

9600 Bd, 8N1

image

@maribu
Copy link
Member Author

maribu commented Nov 27, 2023

Using USEMODULE=stdio_rtt make BOARD=nrf51dk flash term in tests/periph/uart:

9600 Bd, 8N1

image

115200 Bd, 8E1

image

115200 Bd, 8N1

image

@maribu
Copy link
Member Author

maribu commented Nov 27, 2023

Tested using make BOARD=nrf52840dk flash term in tests/periph/uart, connected the logic analyzer to the second UART (Arduino pins D0/D1):

9600 Bd, 8N1

image

115200 BD, 8E1

image

115200 Bd, 8E2

image

115200 Bd, 8N1

image

115200 Bd, 8N2

image

@maribu maribu added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet labels Nov 27, 2023
@riot-ci
Copy link

riot-ci commented Nov 27, 2023

Murdock results

✔️ PASSED

659ef97 cpu/nrf5x_common: clean up UART implementation

Success Failures Total Runtime
7957 0 7957 09m:49s

Artifacts

@benpicco benpicco requested a review from dylad November 27, 2023 11:55
@dylad dylad self-assigned this Dec 4, 2023
Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

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

Simple cleanup

@benpicco benpicco enabled auto-merge December 10, 2023 01:27
@benpicco benpicco added this pull request to the merge queue Dec 10, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Dec 10, 2023
@maribu maribu added this pull request to the merge queue Dec 10, 2023
Merged via the queue into RIOT-OS:master with commit a3cd9ef Dec 10, 2023
28 checks passed
@maribu maribu deleted the cpu/nrf5x_common/cleanup_uart branch December 10, 2023 12:02
@maribu
Copy link
Member Author

maribu commented Dec 10, 2023

Thx :-)

@MrKevinWeiss MrKevinWeiss added this to the Release 2024.01 milestone Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants