-
Notifications
You must be signed in to change notification settings - Fork 268
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
SVDParser._parse_peripheral() should handle clusters #47
Comments
Looking at this SAADC peripheral a bit more, there are at least two cases to support:
|
Here's a snippet of the vendor-provided CMSIS core header showing how the two cases break down in memory:
|
Peripherals defined in some SVDs (for example, the SAADC peripheral in https://github.com/posborne/cmsis-svd/blob/master/data/Nordic/nrf52.svd) declare some registers via clusters.
However, the current SVDParser._parse_peripheral() implementation in parser.py (i.e. https://github.com/posborne/cmsis-svd/blob/master/python/cmsis_svd/parser.py#L240) does not take this into account. This means that the parsed peripheral's register list is missing information that is provided in the SVD file.
Here is an example of clusters as used by the SAADC peripheral definition for nRF52:
Note that the "clusters" node has a top-level address offset, and that the individual registers within a cluster have offsets relative to that top-level offset. Otherwise the register fields within a cluster are very similar to the register nodes already parsed (they contain name, description, addressOffset, access, and perhaps fields.
Can _parse_peripheral() be extended to support clusters as well?
The text was updated successfully, but these errors were encountered: