atsamd-rs / atsamd

Target atsamd microcontrollers using Rust
https://matrix.to/#/#atsamd-rs:matrix.org
Apache License 2.0
541 stars 197 forks source link

Incorrect values in SVD files #699

Open johngigantic opened 8 months ago

johngigantic commented 8 months ago

Probe-rs threw some errors when opening debug configurations with the ATSAME54P20A SVD file in this repository. The following lines are in question - there is a single hex digit typo in three resetValue fields. This is verified by checking the D5X/E5X family data sheet.

For the ATSAME54P20A SVD file, the errors are as follows:

Line 27591: the resetValue should be 0x00, not 0xE00. `

HC1R Host Control 1 0x28 8 0x00 ` Line 27720: the resetValue should be 0x00, not 0xE00, as in the last error. ` HC1R_EMMC_MODE Host Control 1 HC1R 0x28 8 0x00 ` Line 31929: the resetValue should be 0x0000, not 0x20000. ` SISR Slot Interrupt Status 0xFC 16 read-only 0x20000 `
johngigantic commented 8 months ago

More to the point, errors such as these may be present on several of the SVD files. Probe-rs was able to detect these ones in particular because the values did not fit in the bitfield size.

Are there SVD files which are more up-to-date with these errors fixed? Is it worth just trying to fix all these values manually - which may not be too bad if probe-rs detects them and there's only 1-5 per SVD file?

sajattack commented 8 months ago

The svd files come from Microchip atpacks. We can patch or update them if a better version is available. If a patch is needed see here https://github.com/atsamd-rs/atsamd/blob/master/svd/devices/include/atsamd5x.xsl

pustekuchen91 commented 6 months ago

I already openend two tickets @ microchip for this issue. They are aware of the problem and want to fix this in the future. But they cant tell when. There are serveral more svd files with the same error. e.g. ATSAME53J20, ATSAME53N20