Skip to content

GD32: Fix Serial DMA not honoring the SERIAL_DMA flag #27800

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

Merged
merged 4 commits into from
Apr 19, 2025

Conversation

bmourit
Copy link
Contributor

@bmourit bmourit commented Apr 17, 2025

Description

This fixes the GD32 serial DMA always being enabled in the Arduino Core library regardless of the marlin SERIAL_DMA flag. We now call the provided "begin" overload function from the Arduino core and pass a bool parameter to enable DMA on the Rx pin.

Requirements

Requires #27801
Supported GD32 board.

Benefits

Fixes an issue that could cause unexpected and unhandled interrupts when SERIAL_DMA is disabled in Marlin.

Related Issues

None.

…ibrary, regardless of the marlin SERIAL_DMA flag. Leading to undefined behavior. We now call the provided beginoverload function from Arduino core and pass a bool parameter to enable DMA on the Rx pin.
@bmourit bmourit changed the title Fix Serial DMA not honoring the SERIAL_DMA flag [GD32] Fix Serial DMA not honoring the SERIAL_DMA flag Apr 17, 2025
@bmourit bmourit changed the title [GD32] Fix Serial DMA not honoring the SERIAL_DMA flag GD32: Fix Serial DMA not honoring the SERIAL_DMA flag Apr 17, 2025
@thinkyhead thinkyhead added PR: Bug Fix C: Peripherals T: HAL & APIs Topic related to the HAL and internal APIs. A: STM32 A: GD32 and removed A: STM32 labels Apr 18, 2025
@thinkyhead thinkyhead merged commit d40bf0d into MarlinFirmware:bugfix-2.1.x Apr 19, 2025
66 checks passed
@bmourit bmourit deleted the serial_dma_fix branch April 24, 2025 16:48
EvilGremlin pushed a commit to EvilGremlin/Marlin that referenced this pull request May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: GD32 C: Peripherals PR: Bug Fix T: HAL & APIs Topic related to the HAL and internal APIs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants