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 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 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