Skip to content

No suitable SAI peripheral version for WB55 #636

@tomaz-suller

Description

@tomaz-suller

The CubeMX database assigns SAI v2.0 for the STMWB55xx family, which is mapped to the sai_v1.rs implementation:

(".*:SAI:sai1_v2_0", ("sai", "v1", "SAI")),

This implementation however restricts the PLL clock divisor to much fewer options (basically only even values) than the CubeMX interface, which allows arbitrary values up to 86. It also does not support the PDM interface, which the WB55 family clearly supports (e.g. RM0434 Rev 14, Section 36.4.10 "PDM interface"). Either the implementation is wrong or CubeMX is, and my assumption is Embassy is right.

This then begs the question of what the correct version is. After exploring the CubeMX database files a bit, I noticed some comments mentioning the H7 line, so I decided to check the official SAI implementations in the HALs of both the WB and the H7, and what you get is

Image

(left is WB, right is H7)

and since the WB implementation follows from the SAI v2.1 #if block, I assumed that the actual version of the SAI is v2.1 rather than v2.0.

So far this is a lot of speculation of course, but at any rate there doesn't seem to be an established process for providing fixes to peripheral mappings as there is for register mappings. Assuming this correction should be made, how should we go about making it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions