Hello,
a while ago I posted about problems I found in the LPC82x SVD file. I recently noticed that newer SVD files for LPC822 and LPC824 are available via the MCUXpresso SDK Builder, so I tried updating my LPC82x Rust bindings based on the new files.
While those new files fix all the errors that I previously reported (thank you!), I found many new problems in them. Some of them are obvious and easy to fix. But a large number of them are subtle, and could lead to subtle bugs in programs that rely on the correctness of those files. For this reason, I will stay away from those files, and recommend anyone who considers using them do the same.
As I said before, some of the bugs are obvious and easy to fix. But there's a large number of incorrect reset masks, that I believe could turn into a debugging nightmare for anyone using language bindings based on those files. Here's a list of bugs I found, with links to commits in my work-in-progress branch that fix them (since the LPC822 and LPC824 files are virtually identical, these problems apply to both):
Please note that I haven't reviewed these fixes. As I said, this branch is in a work-in-progress state, and I gave up on using the files due to the numerous errors.
In addition to the bugs that I fixed in my branch, there are some more problems that I found, but don't have fixes for:
And lastly, I found something that looked odd in the user manual itself: The TIMER registers in MRT0 have a field called VALUE. According to the user manual, the reset value for that field is 0x00FFFFFF, which looks odd for a 31-bit field. It also contradicts the register overview, which gives a reset value of 0x7FFFFFFF for the register.
I'd like to emphasize that all these errors in the reset masks are extremely damaging to my use case. They could cause single bits or groups of bits in registers to have unexpected values. That could lead to really weird bugs that are hard to find, because they are buried in the generated peripheral access code. I hope that it will be possible to fix all these mistakes and get solid versions of these SVD files. I thank NXP for all the effort they've expended on these files so far!
I just checked, and it seems the latest versions of the SVD files available via MCUXpresso SDK Builder still have the problems I reported.
jeremyzhou, do you know whether this is something that's going to be fixed any time soon? Thank you!
Hi Hanno Braun,
Please create a request about this report , I will escalate its priority to be solved.
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thank you, jeremyzhou!
I've created support request 00201109. Unfortunately it looks like to me like all my formatting was removed, making the description quite horrible to read. I hope it looks better on your end.
Hi Hanno Braun,
Thank you for your information
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------