Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions devices/stm32/stm32h5-03.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<vector position="132" name="I3C2_ER"/>
<vector position="133" name="COMP1"/>
</driver>
<driver name="adc" type="stm32">
<driver name="adc" type="stm32-h5">
<instance value="1"/>
</driver>
<driver name="comp" type="stm32-tsmc90_h5_cube">
Expand Down Expand Up @@ -150,7 +150,9 @@
</driver>
<driver name="gtzc" type="stm32-v2.2"/>
<driver name="hash" type="stm32-v4.0"/>
<driver name="i2c" type="stm32-v1.1">
<driver name="i2c" type="stm32-extended">
<feature value="dnf"/>
<feature value="fmp"/>
<instance value="1"/>
<instance value="2"/>
</driver>
Expand Down Expand Up @@ -178,13 +180,13 @@
<driver name="pwr" type="stm32-v1.0"/>
<driver name="ramcfg" type="stm32-v1.0"/>
<driver name="rcc" type="stm32-v1.1">
<max-frequency value="240000000"/>
<max-frequency value="250000000"/>
</driver>
<driver name="rng" type="stm32"/>
<driver name="rtc" type="stm32-rtc2_v2_u5_cube"/>
<driver name="sau" type="stm32-v2.0"/>
<driver name="sbs" type="stm32-v1.1"/>
<driver name="spi" type="stm32">
<driver name="spi" type="stm32-extended">
<instance value="1"/>
<instance value="2"/>
<instance value="3"/>
Expand All @@ -204,7 +206,8 @@
<instance value="2"/>
<instance value="3"/>
</driver>
<driver name="usart" type="stm32">
<driver name="usart" type="stm32-extended">
<feature value="over8"/>
<instance value="1"/>
<instance value="2"/>
<instance value="3"/>
Expand Down
16 changes: 10 additions & 6 deletions devices/stm32/stm32h5-23_33.xml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
<vector position="131" name="I3C2_EV"/>
<vector position="132" name="I3C2_ER"/>
</driver>
<driver name="adc" type="stm32">
<driver name="adc" type="stm32-h5">
<instance value="1"/>
<instance value="2"/>
</driver>
Expand Down Expand Up @@ -213,7 +213,9 @@
</driver>
<driver name="hash" type="stm32-v4.0"/>
<driver name="hdmi_cec" type="stm32-v2.0"/>
<driver name="i2c" type="stm32-v1.1">
<driver name="i2c" type="stm32-extended">
<feature value="dnf"/>
<feature value="fmp"/>
<instance value="1"/>
<instance value="2"/>
<instance device-pin="c|r|v|z" value="3"/>
Expand Down Expand Up @@ -247,7 +249,7 @@
<driver name="pwr" type="stm32-v1.0"/>
<driver name="ramcfg" type="stm32-v1.0"/>
<driver name="rcc" type="stm32-v1.5">
<max-frequency value="240000000"/>
<max-frequency value="250000000"/>
</driver>
<driver name="rng" type="stm32"/>
<driver name="rtc" type="stm32-rtc2_v2_u5_cube"/>
Expand All @@ -257,7 +259,7 @@
<driver device-pin="r|v|z" name="sdmmc" type="stm32-v2.1">
<instance value="1"/>
</driver>
<driver name="spi" type="stm32">
<driver name="spi" type="stm32-extended">
<instance value="1"/>
<instance value="2"/>
<instance value="3"/>
Expand All @@ -284,14 +286,16 @@
<instance value="12"/>
<instance value="15"/>
</driver>
<driver name="uart" type="stm32">
<driver name="uart" type="stm32-extended">
<feature value="over8"/>
<instance value="4"/>
<instance value="5"/>
</driver>
<driver device-pin="c|r|v|z" name="ucpd" type="stm32-v1.0">
<instance value="1"/>
</driver>
<driver name="usart" type="stm32">
<driver name="usart" type="stm32-extended">
<feature value="over8"/>
<instance value="1"/>
<instance value="2"/>
<instance device-pin="c|r|v|z" value="3"/>
Expand Down
16 changes: 10 additions & 6 deletions devices/stm32/stm32h5-62_63_73.xml
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
<vector position="129" name="LPTIM5"/>
<vector position="130" name="LPTIM6"/>
</driver>
<driver name="adc" type="stm32">
<driver name="adc" type="stm32-h5">
<instance value="1"/>
<instance value="2"/>
</driver>
Expand Down Expand Up @@ -269,7 +269,9 @@
</driver>
<driver name="hash" type="stm32-v4.0"/>
<driver name="hdmi_cec" type="stm32-v2.0"/>
<driver name="i2c" type="stm32-v1.1">
<driver name="i2c" type="stm32-extended">
<feature value="dnf"/>
<feature value="fmp"/>
<instance value="1"/>
<instance value="2"/>
<instance value="3"/>
Expand Down Expand Up @@ -307,7 +309,7 @@
<driver name="pwr" type="stm32-v1.0"/>
<driver name="ramcfg" type="stm32-v1.0"/>
<driver name="rcc" type="stm32-v1.0">
<max-frequency value="240000000"/>
<max-frequency value="250000000"/>
</driver>
<driver name="rng" type="stm32"/>
<driver name="rtc" type="stm32-rtc2_v2_u5_cube"/>
Expand All @@ -322,7 +324,7 @@
<instance value="1"/>
<instance device-name="63|73" device-pin="a|i|z" value="2"/>
</driver>
<driver name="spi" type="stm32">
<driver name="spi" type="stm32-extended">
<instance value="1"/>
<instance value="2"/>
<instance value="3"/>
Expand Down Expand Up @@ -355,7 +357,8 @@
<instance value="16"/>
<instance value="17"/>
</driver>
<driver name="uart" type="stm32">
<driver name="uart" type="stm32-extended">
<feature value="over8"/>
<instance value="4"/>
<instance value="5"/>
<instance value="7"/>
Expand All @@ -366,7 +369,8 @@
<driver name="ucpd" type="stm32-v1.0">
<instance value="1"/>
</driver>
<driver name="usart" type="stm32">
<driver name="usart" type="stm32-extended">
<feature value="over8"/>
<instance value="1"/>
<instance value="2"/>
<instance value="3"/>
Expand Down
2 changes: 1 addition & 1 deletion devices/stm32/stm32u5-35_45.xml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
<vector position="124" name="FMAC"/>
<vector position="125" name="LSECSSD"/>
</driver>
<driver name="adc" type="stm32">
<driver name="adc" type="stm32-h5">
<instance value="1"/>
<instance value="4"/>
</driver>
Expand Down
2 changes: 1 addition & 1 deletion devices/stm32/stm32u5-75_85.xml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
<vector position="124" name="FMAC"/>
<vector position="125" name="LSECSSD"/>
</driver>
<driver name="adc" type="stm32">
<driver name="adc" type="stm32-h5">
<instance value="1"/>
<instance value="4"/>
</driver>
Expand Down
2 changes: 1 addition & 1 deletion devices/stm32/stm32u5-95_99_a5-.xml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
<vector device-name="99" position="137" name="DSI"/>
<vector device-name="99" position="138" name="DCACHE2"/>
</driver>
<driver name="adc" type="stm32">
<driver name="adc" type="stm32-h5">
<instance value="1"/>
<instance value="2"/>
<instance value="4"/>
Expand Down
2 changes: 1 addition & 1 deletion devices/stm32/stm32u5-95_99_a5_a9-q.xml
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
<vector device-name="99|a9" position="137" name="DSI"/>
<vector device-name="99|a9" position="138" name="DCACHE2"/>
</driver>
<driver name="adc" type="stm32">
<driver name="adc" type="stm32-h5">
<instance value="1"/>
<instance value="2"/>
<instance value="4"/>
Expand Down
2 changes: 1 addition & 1 deletion devices/stm32/stm32u5-f7_f9_g7_g9-q.xml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
<vector position="139" name="GFXTIM"/>
<vector position="140" name="JPEG"/>
</driver>
<driver name="adc" type="stm32">
<driver name="adc" type="stm32-h5">
<instance value="1"/>
<instance value="2"/>
<instance value="4"/>
Expand Down
2 changes: 1 addition & 1 deletion devices/stm32/stm32u5-f7_g7-.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
<vector position="139" name="GFXTIM"/>
<vector position="140" name="JPEG"/>
</driver>
<driver name="adc" type="stm32">
<driver name="adc" type="stm32-h5">
<instance value="1"/>
<instance value="2"/>
<instance value="4"/>
Expand Down
14 changes: 1 addition & 13 deletions tools/generator/dfg/stm32/stm.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,11 +489,7 @@ def fixMemoryForDevice(did, memories: dict[str, dict], header) -> list[dict]:
mems[name] = data

# Correct memories for specific devices
if did.string.startswith("stm32l083"):
# https://github.com/Open-CMSIS-Pack/STM32L0xx_DFP/pull/2
mems["sram"]["size"] = 0x00005000

elif did.family == "f2":
if did.family == "f2":
# Split SRAM1 into SRAM1/2
mems["sram1"] = mems.pop("sram")
add_ram(mems, "sram2", 16*1024, target="sram1")
Expand Down Expand Up @@ -527,10 +523,6 @@ def fixMemoryForDevice(did, memories: dict[str, dict], header) -> list[dict]:
# Fix missing alias, ITCM_FLASH is faster
mems["flash"]["alias"] = "itcm_flash"

elif did.string.startswith("stm32g0b0vet"):
# https://github.com/Open-CMSIS-Pack/STM32G0xx_DFP/pull/3
mems["sram"]["size"] = 0x00024000

elif did.family == "g4":
# Fix missing CCM and SRAM2
sizes = header.get_memory_sizes()
Expand Down Expand Up @@ -559,10 +551,6 @@ def fixMemoryForDevice(did, memories: dict[str, dict], header) -> list[dict]:
d2_sram2, d2_sram3 = 128, 32
# CM4 also missing d3_SRAM
mems["d3_sram"] = {"start": 0x38000000, "size": 64*1024, "access": "rwx"}
# STM32H755/57 has the wrong size d2_sram1
if did.name in ["55", "57"] and did.get("core") == "m4":
# https://github.com/Open-CMSIS-Pack/STM32H7xx_DFP/pull/7
mems["d2_sram1"]["size"] = 0x40000

if d2_sram3: add_ram(mems, "d2_sram3", d2_sram3*1024, target="d2_sram1")
if d2_sram2: add_ram(mems, "d2_sram2", d2_sram2*1024, target="d2_sram1")
Expand Down
2 changes: 0 additions & 2 deletions tools/generator/dfg/stm32/stm_device_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,6 @@ def dfp_findall(key, attribs=None):
# Find the correct CMSIS header
dfp_compile = dfp_findall("compile")[0].get("define")
p["cmsis_header"] = cmsis_header = dfp_folder[:-4].lower()
# https://github.com/Open-CMSIS-Pack/STM32H7xx_DFP/pull/7
if did.string == "stm32h730ibt6q": dfp_compile = "STM32H730xxQ"
stm_header = STMHeader(did, cmsis_header, dfp_compile)
if not stm_header.is_valid:
LOGGER.error("CMSIS Header invalid for %s", did.string)
Expand Down
22 changes: 16 additions & 6 deletions tools/generator/dfg/stm32/stm_peripherals.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@
'features': [],
'protocols': ['analog-in'],
'devices': [{'family': ['h7']}]
},{
'hardware': 'stm32-h5',
'features': [],
'protocols': ['analog-in'],
'devices': [{'family': ['h5', 'u5']}]
},{
'hardware': 'stm32',
'features': [],
Expand Down Expand Up @@ -135,7 +140,7 @@
'hardware': 'stm32-mux-stream',
'features': [],
'protocols': ['mem2mem', 'mem2per', 'per2per'],
'devices': [{'family': ['h7']}]
'devices': [{'family': ['h5', 'h7']}]
},
{
'hardware': 'stm32-stream-channel',
Expand Down Expand Up @@ -164,7 +169,7 @@
'hardware': 'stm32h7',
'features': [],
'protocols': ['mem2mem', 'mem2per', 'per2per'],
'devices': [{'family': ['h7']}]
'devices': [{'family': ['h5', 'h7']}]

}
]
Expand Down Expand Up @@ -197,7 +202,7 @@
'hardware': 'stm32-extended',
'features': [],
'protocols': [],
'devices': [{'family': ['h7', 'u5']}]
'devices': [{'family': ['h5', 'h7', 'u5']}]
},{
'hardware': 'stm32',
'features': [],
Expand Down Expand Up @@ -405,7 +410,7 @@
'hardware': 'stm32-extended',
'features': ['dnf', 'fmp'],
'protocols': ['i2c-v3.0', 'smb-v2.0', 'pmb-v1.1'],
'devices': [{'family': ['c0', 'f3', 'f7', 'l4', 'l5', 'h7', 'g4', 'u5', 'wb']}]
'devices': [{'family': ['c0', 'f3', 'f7', 'l4', 'l5', 'h5', 'h7', 'g4', 'u5', 'wb']}]
}
]
},{
Expand All @@ -417,7 +422,7 @@
'hardware': 'stm32-extended',
'features': ['dnf', 'fmp'],
'protocols': ['i2c-v3.0', 'smb-v2.0', 'pmb-v1.1'],
'devices': [{'family': ['c0', 'f0', 'g0', 'f3', 'f7', 'l0', 'l4', 'l5', 'h7', 'g4', 'u0', 'u5', 'wb']}]
'devices': [{'family': ['c0', 'f0', 'g0', 'f3', 'f7', 'l0', 'l4', 'l5', 'h5', 'h7', 'g4', 'u0', 'u5', 'wb']}]
}
]
}
Expand All @@ -440,6 +445,11 @@
'features': [],
'protocols': ['uart'],
'devices': [{'family': ['f7', 'l4']}]
},{
'hardware': 'stm32-extended',
'features': ['over8'],
'protocols': ['uart', 'spi'],
'devices': [{'family': ['l0', 'h5']}]
},{
'hardware': 'stm32',
'features': ['over8'],
Expand Down Expand Up @@ -475,7 +485,7 @@
'hardware': 'stm32-extended',
'features': ['over8'],
'protocols': ['uart', 'spi'],
'devices': [{'family': ['l0']}]
'devices': [{'family': ['l0', 'h5']}]
},{
'hardware': 'stm32',
'features': ['over8'],
Expand Down