I noticed while trying to run svd2rust on one of the ATSAML11 SVD files that the operation failed with the following message:
[INFO svd2rust] Parsing device from SVD file
[ERROR svd2rust] Error parsing SVD XML file
Caused by:
0: In device `ATSAML11E14A`
1: In peripheral `DIB`
2: In register `DAUTHSTATUS`
3: Parsing field `NSID` at 19898:19
4: `EnumeratedValue error: Value 2 out of range 0..2
All 6 of the ATSAML11 SVD files appear to have an issue with the NSID and NSNID fields of the DAUTHSTATUS register, in that they set enumerated values of 2 and 3 for a field that is stated to be only 1 bit wide.
I looked at core_cm23.h and that file confirms that these fields should actually be 2 bits wide:
I noticed while trying to run
svd2rust
on one of the ATSAML11 SVD files that the operation failed with the following message:All 6 of the ATSAML11 SVD files appear to have an issue with the NSID and NSNID fields of the DAUTHSTATUS register, in that they set enumerated values of 2 and 3 for a field that is stated to be only 1 bit wide.
I looked at
core_cm23.h
and that file confirms that these fields should actually be 2 bits wide:I fixed the issue in these fields and
svd2rust
runs successfully now. I haven't attempted to determine whether a similar issue may exist elsewhere.