From 6cdfc6c1e879487383093d24659656c71c75142b Mon Sep 17 00:00:00 2001 From: Bob McWhirter Date: Mon, 14 Jun 2021 11:20:22 -0400 Subject: [PATCH 1/3] Better parsing around ADC_COMMON base addr. --- parse.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/parse.py b/parse.py index cfe753a..7a80770 100644 --- a/parse.py +++ b/parse.py @@ -410,8 +410,9 @@ def parse_chips(): if pname in FAKE_PERIPHERALS: continue if pname.startswith('ADC'): - if not pname + '_COMMON' in peris: - peris[pname + '_COMMON'] = ip['@Name'] + '_COMMON:'+removesuffix(ip['@Version'], '_Cube') + if not 'ADC_COMMON' in peris: + print(f'adding ADC_COMMON') + peris['ADC_COMMON'] = 'ADC_COMMON:'+removesuffix(ip['@Version'], '_Cube') peris[pname] = pkind pins[pname] = [] @@ -462,6 +463,13 @@ def parse_chips(): peris = {} for pname, pkind in chip['peripherals'].items(): addr = h['defines'].get(pname) + if addr is None: + if pname == 'ADC_COMMON': + addr = h['defines'].get('ADC1_COMMON') + if addr is None: + addr = h['defines'].get('ADC12_COMMON') + if addr is None: + addr = h['defines'].get('ADC123_COMMON') if addr is None: continue From dea6d819ddc661278da48b298453a8f795774249 Mon Sep 17 00:00:00 2001 From: Bob McWhirter Date: Mon, 14 Jun 2021 11:35:52 -0400 Subject: [PATCH 2/3] Add VREFINT for STM32L4 family and reparse. --- data/extra/family/STM32L4.yaml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 data/extra/family/STM32L4.yaml diff --git a/data/extra/family/STM32L4.yaml b/data/extra/family/STM32L4.yaml new file mode 100644 index 0000000..a72291a --- /dev/null +++ b/data/extra/family/STM32L4.yaml @@ -0,0 +1,4 @@ +peripherals: + VREFINTCAL: + address: 0x1FFF75AA + block: vrefintcal_v1/VREFINTCAL From c511da96647fca0379797fbdf40dd311ffff40ab Mon Sep 17 00:00:00 2001 From: Bob McWhirter Date: Mon, 14 Jun 2021 11:56:04 -0400 Subject: [PATCH 3/3] And WB55 VREFINT. --- data/extra/family/STM32WB.yaml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 data/extra/family/STM32WB.yaml diff --git a/data/extra/family/STM32WB.yaml b/data/extra/family/STM32WB.yaml new file mode 100644 index 0000000..a72291a --- /dev/null +++ b/data/extra/family/STM32WB.yaml @@ -0,0 +1,4 @@ +peripherals: + VREFINTCAL: + address: 0x1FFF75AA + block: vrefintcal_v1/VREFINTCAL