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

STM32G4 SPI4 has swapped reset values for CR1 and CR2 #957

Open
techmccat opened this issue Feb 4, 2024 · 0 comments
Open

STM32G4 SPI4 has swapped reset values for CR1 and CR2 #957

techmccat opened this issue Feb 4, 2024 · 0 comments

Comments

@techmccat
Copy link

I notieced while looking at the g474 svd files because svd2rust had created different modules for spi1 and spi4, despite the manual not saying anything about different registers.

spi2 and spi3 are affected too since they re-export spi4.
Fixing this difference could also allow all the spi peripheral to share RegisterBlock definition (thus implementing Deref for the same type)

Register definitions are on page 1787 of the g4 manual found here
Here's the diff of the peripheral definitions I manually copy-pasted from the svd

2c2
< <name>SPI1</name>
---
> <name>SPI4</name>
5c5
< <baseAddress>0x40013000</baseAddress>
---
> <baseAddress>0x40013C00</baseAddress>
12,14c12,14
< <name>SPI1</name>
< <description>SPI1</description>
< <value>35</value>
---
> <name>SPI4</name>
> <description>SPI4</description>
> <value>84</value>
24c24
< <resetValue>0x00000000</resetValue>
---
> <resetValue>0x00000700</resetValue>
119c119
< <resetValue>0x00000700</resetValue>
---
> <resetValue>0x00000000</resetValue>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants