Numerous problems in LPC82x SVD file

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Numerous problems in LPC82x SVD file

1,003 Views
hannobraun
Contributor II

I've been working on LPC82x register mappings for the Rust programming language using this SVD file (as of this writing, this links to version 0.4 of the file). I assume this is the right place to report issues with this file. If not, I'd appreciate some direction.

The SVD file has numerous problems that I had to fix in my project. I hope those fixes can be applied to the original file, to benefit others who are using it. For each problem, I've added a short description, as well a link to a patch that fixes the issue. I'm not suggesting that my patches are always the best solution, but at the very least they demonstrate clearly where the problem is located.

1. Duplicate Names (patch)

Various enumerated values have identical names, leading to build errors in the generated code.

2. GPIO "B" registers have wrong size (patch)

The size of these registers is specified as "1" (meaning the registers are 1 bit wide, according to the SVD spec). According to the user manual, the registers are 8 bit wide, with 7 of them being reserved.

3. Names are generally weird

This is not a serious problem, but I'm mentioning it for the sake of completeness. The names in the SVD file seem to be generated from human-readable documentation, which makes a lot of them read like cut-off sentences. One special case of this, for which I've created a patch on my side, are names that contain multiple underscores in a row, as that leads to warnings in my generated code.

4. Bits missing in PRESETCTRL register (patch)

According the the user manual, PRESETCTRL contains bits for the ADC (ADC_RST_N) and the DMA (DMA_RST_N). Those are missing from the SVD file.

5. Wrong resolution for MRT timers (patch)

The MRT timer value has a resolution of 30 bits (according to the user manual), but the SVD file specifies them as 24 bits wide.

6. SEL_EXTCLK bit is missing (patch)

The SEL_EXTCLK bit is missing from the WKT's CTRL register.

7. Missing IOCONCLKDIV registers (patch)

Only IOCONCLKDIV6 is where it's supposed to be. The registers IOCONCLKDIV5 to IOCONCLKDIV0 are missing.

This is everything I've encountered so far, but I wouldn't be surprised if I were just scratching the surface. I'll report any further problems as I find them.

Thank you,

Hanno Braun

Labels (1)
Tags (3)
3 Replies

731 Views
amish_desai
NXP Employee
NXP Employee

Hi Hanno,

Thank you for your information.....can you please post the updated the SVD file? We would like to go through the process of checking rest of the file, getting the SVD file updated, and would like to ensure our IDE tools are updated.

Thanks.

NXP

0 Kudos

731 Views
hannobraun
Contributor II

Hi Amish,

thank you for your reply. I've attached the updated SVD file (with all the patches I linked applied) to this post.

Thank you,

Hanno

0 Kudos

731 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Hanno Braun,

Thank you for your interest in NXP Semiconductor products and 
for the opportunity to serve you.

Thanks for your sharing.

It's great.

Have a great day.

TIC

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------