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 undefined behavior compile error #346

Merged
merged 5 commits into from
Nov 22, 2023

Conversation

Sh3Rm4n
Copy link
Member

@Sh3Rm4n Sh3Rm4n commented Nov 21, 2023

No description provided.

@adamgreig
Copy link
Member

It looks like this changes the access of the data register from Word-sized (which I think might be u8 or u16?) to always be a 32-bit access. Annoyingly the data register is access-size-sensitive, and doing a 32-bit read can cause up to 4 8-bit words to be popped from the peripheral's FIFO. This is the same problem as stm32-rs/stm32f7xx-hal#207

@Sh3Rm4n
Copy link
Member Author

Sh3Rm4n commented Nov 22, 2023

Thanks for the info. This means, we currently can not read 8 or 16 bits from the data register through the svd2rust API, but casting is not the correct way either?

@Sh3Rm4n Sh3Rm4n merged commit a8db75e into stm32-rs:master Nov 22, 2023
25 of 26 checks passed
@Sh3Rm4n Sh3Rm4n deleted the fix/compiler-error branch November 22, 2023 21:06
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