Skip to content

sai: sai_v1 patch and sai peripheral apply to H7. Fix FSDEF #347

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 1 commit into from
Mar 11, 2020

Conversation

richardeoin
Copy link
Member

SAI peripheral applies to the H7 also. Note that we introduce the very slightest difference with RM0433 (single core 743/753) by setting [AB]CR1.NOMCK -> [AB]CR1.NODIV. Whilst RM0433 uses NOMCK, both RM0399 (later dual core parts) and sai/sai.py use NODIV.
The description in sai/sai.py has text from both the old and new definitions, and it appears the functionality of the bit is unchanged.

[AB]FRCR.FSDEF is marked as read only in the SVD and the register diagram in the RM. However, in the prose text in RM0399 it is clearly noted as read-write "This bit is set and cleared by software."

SAI peripheral applies to the H7 also. Note that we introduce the very
slightest difference with RM0433 (single core 743/753) by setting
`[AB]CR1.NOMCK` -> `[AB]CR1.NODIV`. Both RM0399 (later dual core
parts) and `sai/sai.py` use NODIV. The description in `sai/sai.py` has
text from both the old and new definitions, and it appears the
functionality of the bit is unchanged.

[AB]FRCR.FSDEF is marked as read only in the SVD and the register
diagram in the RM. However, in the prose text in the RM is is clearly
noted as read-write "This bit is set and cleared by software." (RM0399
rev2 page 2458).
@adamgreig
Copy link
Member

Ugh, a pain that they renamed the bit. I'm a little hesitant to rename valid bits in the older devices just to match the existing peripheral file, but if this also makes life easier for HALs it might be worth doing. Any thoughts?

@richardeoin
Copy link
Member Author

Pragmatically the answer is to rename it for consistency, but it does break the rule of matching the best interpretation of the RM. My opinion is the RM isn't invariant either (ST release new versions!), nothing will ever be perfect, practicality wins in a trivial case like this..

Copy link
Member

@adamgreig adamgreig left a comment

Choose a reason for hiding this comment

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

Yea, OK, let's do it.

bors r+

@bors
Copy link
Contributor

bors bot commented Mar 11, 2020

Build succeeded

@bors bors bot merged commit df8589e into stm32-rs:master Mar 11, 2020
richardeoin added a commit to richardeoin/stm32-rs that referenced this pull request Oct 3, 2021
Other H7 parts are unchanged. Improve description of NOMCK/NODIV bit

See previous PR stm32-rs#347. Fixes stm32-rs#618
bors bot added a commit that referenced this pull request Oct 3, 2021
640: H7 RM0433: Add NOMCK at SAI [AB]CR1 bit 19 and remove MCKEN r=adamgreig a=richardeoin

Other H7 parts are unchanged. Improve description of NOMCK/NODIV bit

See previous PR #347. Fixes #618

Co-authored-by: Richard Meadows <962920+richardeoin@users.noreply.github.com>
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