<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic SVD files for LPC822/LPC824 are broken in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/SVD-files-for-LPC822-LPC824-are-broken/m-p/836184#M33347</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a while ago I &lt;A _jive_internal="true" href="https://community.nxp.com/thread/465465"&gt;posted about problems I found&lt;/A&gt; in the LPC82x SVD file. I recently noticed that newer SVD files for LPC822 and LPC824 are available via the &lt;A href="https://mcuxpresso.nxp.com"&gt;MCUXpresso SDK Builder&lt;/A&gt;, so I tried updating &lt;A href="https://github.com/braun-robotics/rust-lpc82x"&gt;my LPC82x Rust bindings&lt;/A&gt; based on the new files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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):&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;Missing interrupts&lt;/STRONG&gt; (&lt;A href="https://github.com/hannobraun/rust-lpc82x/commit/6e9b0dba89481e3e9f41a82a328d4a2cee4f5fee"&gt;commit&lt;/A&gt;) - Interrupts are missing that were present in the old file.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Comparator control register&lt;/STRONG&gt; (&lt;A href="https://github.com/hannobraun/rust-lpc82x/commit/e37afc08b914d360ae15b7f37311bb6aa3749b6e"&gt;commit&lt;/A&gt;) - Wrong field values in comparator control register&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;MRT0 reset mask&lt;/STRONG&gt; (&lt;A href="https://github.com/hannobraun/rust-lpc82x/commit/5078b3dfc44aede83d42a31334ee833467856825"&gt;commit&lt;/A&gt;) - Incorrect reset masks in MRT0 peripheral.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;ADC reset values and masks&lt;/STRONG&gt; (&lt;A href="https://github.com/hannobraun/rust-lpc82x/commit/83caa91a076b950b5b305ad3e7cf31ca20c67d05"&gt;commit&lt;/A&gt;) - Incorrect reset values and reset masks in ADC peripheral.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;ACOMP reset mask&lt;/STRONG&gt; (&lt;A href="https://github.com/hannobraun/rust-lpc82x/commit/39de78c88fbb64baa3b9ecf8fd2b2fb5d7dae6ca"&gt;commit&lt;/A&gt;) - Incorrect reset mask in ACOMP peripheral.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;INPUTMUX reset masks&lt;/STRONG&gt; (&lt;A href="https://github.com/hannobraun/rust-lpc82x/commit/512517822bc765601a7d558336554225c88f1762"&gt;commit&lt;/A&gt;) - Incorrect reset masks in INPUTMUX peripheral.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;FLASH_CTRL reset value&lt;/STRONG&gt; (&lt;A href="https://github.com/hannobraun/rust-lpc82x/commit/dc136132ca128dbc4e10afbf585cd7bc13e0641a"&gt;commit&lt;/A&gt;) - Incorrect reset value in FLASH_CTRL peripheral.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;IOCON register block size&lt;/STRONG&gt; (&lt;A href="https://github.com/hannobraun/rust-lpc82x/commit/62d32ce74d575f761705e53cbffbcf46a66ef589"&gt;commit&lt;/A&gt;) - IOCON register block has the wrong size.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;ADC0 is missing a lot of enumerated values that were present in the old file.&lt;/LI&gt;&lt;LI&gt;INPUTMUX is missing enumerated values that were present in the old file for the &lt;STRONG&gt;INP&lt;/STRONG&gt; field in &lt;STRONG&gt;DMA_INMUX_INMUX&lt;/STRONG&gt; and the &lt;STRONG&gt;INP_N&lt;/STRONG&gt; field in &lt;STRONG&gt;SCT0_INMUX&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;The &lt;STRONG&gt;FLASHTIM&lt;/STRONG&gt; field in the &lt;STRONG&gt;FLASHCFG&lt;/STRONG&gt; register has two reserved values (0x2, 0x3) according to the user manual, but 0x2 is not reserved in the SVD.&lt;/LI&gt;&lt;LI&gt;The registers in the &lt;STRONG&gt;IOCON&lt;/STRONG&gt; peripheral have the wrong names.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And lastly, I found something that looked odd in the user manual itself: The &lt;STRONG&gt;TIMER&lt;/STRONG&gt; registers in &lt;STRONG&gt;MRT0&lt;/STRONG&gt; have a field called &lt;STRONG&gt;VALUE&lt;/STRONG&gt;. 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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Sep 2018 16:55:29 GMT</pubDate>
    <dc:creator>hannobraun</dc:creator>
    <dc:date>2018-09-18T16:55:29Z</dc:date>
    <item>
      <title>SVD files for LPC822/LPC824 are broken</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SVD-files-for-LPC822-LPC824-are-broken/m-p/836184#M33347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a while ago I &lt;A _jive_internal="true" href="https://community.nxp.com/thread/465465"&gt;posted about problems I found&lt;/A&gt; in the LPC82x SVD file. I recently noticed that newer SVD files for LPC822 and LPC824 are available via the &lt;A href="https://mcuxpresso.nxp.com"&gt;MCUXpresso SDK Builder&lt;/A&gt;, so I tried updating &lt;A href="https://github.com/braun-robotics/rust-lpc82x"&gt;my LPC82x Rust bindings&lt;/A&gt; based on the new files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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):&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;Missing interrupts&lt;/STRONG&gt; (&lt;A href="https://github.com/hannobraun/rust-lpc82x/commit/6e9b0dba89481e3e9f41a82a328d4a2cee4f5fee"&gt;commit&lt;/A&gt;) - Interrupts are missing that were present in the old file.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Comparator control register&lt;/STRONG&gt; (&lt;A href="https://github.com/hannobraun/rust-lpc82x/commit/e37afc08b914d360ae15b7f37311bb6aa3749b6e"&gt;commit&lt;/A&gt;) - Wrong field values in comparator control register&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;MRT0 reset mask&lt;/STRONG&gt; (&lt;A href="https://github.com/hannobraun/rust-lpc82x/commit/5078b3dfc44aede83d42a31334ee833467856825"&gt;commit&lt;/A&gt;) - Incorrect reset masks in MRT0 peripheral.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;ADC reset values and masks&lt;/STRONG&gt; (&lt;A href="https://github.com/hannobraun/rust-lpc82x/commit/83caa91a076b950b5b305ad3e7cf31ca20c67d05"&gt;commit&lt;/A&gt;) - Incorrect reset values and reset masks in ADC peripheral.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;ACOMP reset mask&lt;/STRONG&gt; (&lt;A href="https://github.com/hannobraun/rust-lpc82x/commit/39de78c88fbb64baa3b9ecf8fd2b2fb5d7dae6ca"&gt;commit&lt;/A&gt;) - Incorrect reset mask in ACOMP peripheral.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;INPUTMUX reset masks&lt;/STRONG&gt; (&lt;A href="https://github.com/hannobraun/rust-lpc82x/commit/512517822bc765601a7d558336554225c88f1762"&gt;commit&lt;/A&gt;) - Incorrect reset masks in INPUTMUX peripheral.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;FLASH_CTRL reset value&lt;/STRONG&gt; (&lt;A href="https://github.com/hannobraun/rust-lpc82x/commit/dc136132ca128dbc4e10afbf585cd7bc13e0641a"&gt;commit&lt;/A&gt;) - Incorrect reset value in FLASH_CTRL peripheral.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;IOCON register block size&lt;/STRONG&gt; (&lt;A href="https://github.com/hannobraun/rust-lpc82x/commit/62d32ce74d575f761705e53cbffbcf46a66ef589"&gt;commit&lt;/A&gt;) - IOCON register block has the wrong size.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;ADC0 is missing a lot of enumerated values that were present in the old file.&lt;/LI&gt;&lt;LI&gt;INPUTMUX is missing enumerated values that were present in the old file for the &lt;STRONG&gt;INP&lt;/STRONG&gt; field in &lt;STRONG&gt;DMA_INMUX_INMUX&lt;/STRONG&gt; and the &lt;STRONG&gt;INP_N&lt;/STRONG&gt; field in &lt;STRONG&gt;SCT0_INMUX&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;The &lt;STRONG&gt;FLASHTIM&lt;/STRONG&gt; field in the &lt;STRONG&gt;FLASHCFG&lt;/STRONG&gt; register has two reserved values (0x2, 0x3) according to the user manual, but 0x2 is not reserved in the SVD.&lt;/LI&gt;&lt;LI&gt;The registers in the &lt;STRONG&gt;IOCON&lt;/STRONG&gt; peripheral have the wrong names.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And lastly, I found something that looked odd in the user manual itself: The &lt;STRONG&gt;TIMER&lt;/STRONG&gt; registers in &lt;STRONG&gt;MRT0&lt;/STRONG&gt; have a field called &lt;STRONG&gt;VALUE&lt;/STRONG&gt;. 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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2018 16:55:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SVD-files-for-LPC822-LPC824-are-broken/m-p/836184#M33347</guid>
      <dc:creator>hannobraun</dc:creator>
      <dc:date>2018-09-18T16:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: SVD files for LPC822/LPC824 are broken</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SVD-files-for-LPC822-LPC824-are-broken/m-p/836185#M33348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV class=""&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-containerid="-1" data-containertype="-1" data-content-finding="Community" data-objectid="288368" data-objecttype="3" href="https://community.nxp.com/people/hannobraun"&gt;Hanno Braun&lt;/A&gt;,&lt;/P&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;Thank you for your interest in NXP Semiconductor products and&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;for the opportunity to serve you.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;Thank you for your information&lt;/P&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;Have a great day.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;P&gt;TIC&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2018 02:53:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SVD-files-for-LPC822-LPC824-are-broken/m-p/836185#M33348</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2018-09-21T02:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: SVD files for LPC822/LPC824 are broken</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SVD-files-for-LPC822-LPC824-are-broken/m-p/836186#M33349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just checked, and it seems the latest versions of the SVD files available via &lt;A href="https://mcuxpresso.nxp.com/en/welcome"&gt;MCUXpresso SDK Builder&lt;/A&gt; still have the problems I reported.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/jeremyzhou"&gt;jeremyzhou&lt;/A&gt;‌, do you know whether this is something that's going to be fixed any time soon? Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2019 12:49:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SVD-files-for-LPC822-LPC824-are-broken/m-p/836186#M33349</guid>
      <dc:creator>hannobraun</dc:creator>
      <dc:date>2019-02-25T12:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: SVD files for LPC822/LPC824 are broken</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SVD-files-for-LPC822-LPC824-are-broken/m-p/836187#M33350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="288368" data-username="hannobraun" href="https://community.nxp.com/people/hannobraun"&gt;Hanno Braun&lt;/A&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please create a&lt;A href="https://www.nxp.com/support/support:SUPPORTHOME"&gt; request &lt;/A&gt;about this report , I will escalate its priority to be solved.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/63020iDE640216A94AE082/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;Have a great day.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;P&gt;TIC&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2019 02:56:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SVD-files-for-LPC822-LPC824-are-broken/m-p/836187#M33350</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2019-02-26T02:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: SVD files for LPC822/LPC824 are broken</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SVD-files-for-LPC822-LPC824-are-broken/m-p/836188#M33351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/jeremyzhou"&gt;jeremyzhou&lt;/A&gt;‌!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2019 10:22:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SVD-files-for-LPC822-LPC824-are-broken/m-p/836188#M33351</guid>
      <dc:creator>hannobraun</dc:creator>
      <dc:date>2019-02-26T10:22:46Z</dc:date>
    </item>
  </channel>
</rss>

