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

Fix: STM32WL55 discovery #2048

Merged
merged 5 commits into from
Jan 8, 2025
Merged

Fix: STM32WL55 discovery #2048

merged 5 commits into from
Jan 8, 2025

Conversation

dragonmux
Copy link
Member

Detailed description

In this PR we address issues found while trying to debug STM32WL55 discovery. This process found bugs in both the error recovery implementation for SWD, and in the remote protocol.

On the SWD side, the error detection code failed to properly notice when a read of the DP's CTRL/STAT register failed and then properly handle that with protocol recovery. This slightly complicates the routine, but makes the error discovery and recovery process significantly more robust.

On the remote protocol side, the protocol failed to transfer the TARGETSEL value to use for a given DP for SWD multi-drop, resulting in protocol recovery failing to execute correctly to re-select the target and resume communications. This is corrected by addition of a new command for transferring this information to the shadow DP the probe maintains. Users running firmware from before this point will get a neat message displayed from BMDA informing them of the need to upgrade their firmware.

Your checklist for this pull request

Closing issues

Fixes #2033

…alue used for multi-drop SWD protocol recovery
…o address a protocol recovery issue seen with the STM32WL55
…tsel` value used for multi-drop SWD protocol recovery
…ks as it was causing a faulting CTRL/STAT read to be ignored and the debugger to claim no errors occured
@dragonmux dragonmux added the Bug Confirmed bug label Jan 8, 2025
@dragonmux dragonmux added this to the v2.0 release milestone Jan 8, 2025
@dragonmux dragonmux requested a review from esden January 8, 2025 04:35
Copy link
Member

@esden esden left a comment

Choose a reason for hiding this comment

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

LGTM

@esden esden merged commit 66eb6cc into main Jan 8, 2025
36 checks passed
@dragonmux dragonmux deleted the fix/stm32wl55-discovery branch January 9, 2025 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

STM32WLxx: jtag_scan reports unknown device while swd_scan correctly identifies device
2 participants