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 erroneous read of extra word in swd_read_block() #194

Merged
merged 1 commit into from
Nov 30, 2016

Conversation

flit
Copy link
Collaborator

@flit flit commented Nov 29, 2016

swd_read_block() was always causing the AP to issue a read of an extra word.

This is the root cause of the problem that was also addressed by #189. On Kinetis devices where the UID is read, the bug causes the word after the last UID register, an invalid register on most devices, to also be read. (#189 is still useful on its own, will continue to work on it.)

Verified that the UID is still successfully read as the same value before and after the patch.

Also replaced some literal constants in swd_read_block() with macros to improve readability.

- Also replaced some literal constants with macros to improve readability.
@c1728p9
Copy link
Contributor

c1728p9 commented Nov 29, 2016

Thanks for the detailed investigation of this @flit.

@c1728p9
Copy link
Contributor

c1728p9 commented Nov 29, 2016

@mbed-bot: TEST

Copy link
Contributor

@c1728p9 c1728p9 left a comment

Choose a reason for hiding this comment

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

Is this same change also relevant to cortex-A?

@flit
Copy link
Collaborator Author

flit commented Nov 30, 2016

@c1728p9 Good question about Cortex-A, I'll check.

@flit
Copy link
Collaborator Author

flit commented Nov 30, 2016

@c1728p9 swd_host_ca.c doesn't have a similar swd_read_block() function.

@c1728p9
Copy link
Contributor

c1728p9 commented Nov 30, 2016

Ah, didn't realize that.

@c1728p9 c1728p9 merged commit 5eb2607 into ARMmbed:master Nov 30, 2016
@flit flit deleted the dev_swd_host_fix branch February 2, 2017 16:08
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.

2 participants