Skip to content

Conversation

@wt
Copy link

@wt wt commented Jan 9, 2026

This fixes generation of a pac for the LPC55S16 chip. Before, trying to generate this board's pac would result in the following error:

ERROR svd2rust] Error rendering device
    
    Caused by:
        0: can't render peripheral 'I2S0', group 'I2S'
        1: Could not expand register or cluster block
        2: can't expand cluster 'SECCHANNEL[%s]'
        3: Cluster SECCHANNEL[%s] has size 24928 bits that is more then array increment 256 bits

@wt wt requested a review from a team as a code owner January 9, 2026 07:18
@wt wt force-pushed the fix_cluster_info_size branch from 6587032 to caadcf9 Compare January 9, 2026 07:20
@Emilgardis
Copy link
Member

/ci diff pr

@github-actions
Copy link

github-actions bot commented Jan 9, 2026

Diff for comment

@Emilgardis
Copy link
Member

this definitely results in wrong output. Can you share the SVD file?

image

@wt
Copy link
Author

wt commented Jan 9, 2026

Here's the SVD xml file:
LPC55S16.xml

@Emilgardis
Copy link
Member

The addressOffsets are wrong, seems to be 0xC0 too large

@Emilgardis
Copy link
Member

going to close this PR as it's not correct and seems like the input is the source of the problem experienced.

@Emilgardis Emilgardis closed this Jan 9, 2026
@wt
Copy link
Author

wt commented Jan 10, 2026

Oh, I think I see what you are saying. Thanks for the help.

@Emilgardis
Copy link
Member

Emilgardis commented Jan 10, 2026

to clarify :) this seems to work, not sure it's correct though as I was unable to find register descriptions

diff --git "a" "b"
index 698e1ca..dd099bd 100644
--- "a"
+++ "b"
@@ -54251,7 +54251,7 @@ SPDX-License-Identifier: BSD-3-Clause
           <register>
             <name>PCFG1</name>
             <description>Configuration register 1 for channel pair</description>
-            <addressOffset>0xC20</addressOffset>
+            <addressOffset>0x0</addressOffset>
             <size>32</size>
             <access>read-write</access>
             <resetValue>0</resetValue>
@@ -54300,7 +54300,7 @@ SPDX-License-Identifier: BSD-3-Clause
           <register>
             <name>PCFG2</name>
             <description>Configuration register 2 for channel pair</description>
-            <addressOffset>0xC24</addressOffset>
+            <addressOffset>0x4</addressOffset>
             <size>32</size>
             <access>read-write</access>
             <resetValue>0</resetValue>
@@ -54318,7 +54318,7 @@ SPDX-License-Identifier: BSD-3-Clause
           <register>
             <name>PSTAT</name>
             <description>Status register for channel pair</description>
-            <addressOffset>0xC28</addressOffset>
+            <addressOffset>0x8</addressOffset>
             <size>32</size>
             <access>read-write</access>
             <resetValue>0</resetValue>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants