diff --git a/data/registers/uid_v1.yaml b/data/registers/uid_v1.yaml new file mode 100644 index 0000000..0d83138 --- /dev/null +++ b/data/registers/uid_v1.yaml @@ -0,0 +1,45 @@ +--- +block/UID: + description: Device Factory programmed 96-bit unique device identifier + items: + - name: UID0 + description: Factory programmed 96-bit unique device identifier word 0 + byte_offset: 0 + access: Read + fieldset: UID0 + - name: UID1 + description: Factory programmed 96-bit unique device identifier word 1 + byte_offset: 0x04 + access: Read + fieldset: UID1 + - name: UID2 + description: Factory programmed 96-bit unique device identifier word 2 + byte_offset: 0x08 + access: Read + fieldset: UID2 +fieldset/UID0: + description: UID0 + fields: + - name: XYCOORD + description: X and Y coordinates on the wafer + bit_offset: 0 + bit_size: 32 +fieldset/UID1: + description: UID1 + fields: + - name: WAF_NUM + description: Wafer number (8-bit unsigned number) + bit_offset: 0 + bit_size: 8 + - name: LOT_NUM + description: Lot number[23:0] (ASCII encoded) + bit_offset: 8 + bit_size: 24 +fieldset/UID2: + description: UID2 + fields: + - name: LOT_NUM + description: Lot number[55:24] (ASCII encoded) + bit_offset: 0 + bit_size: 32 + diff --git a/stm32-data-gen/src/chips.rs b/stm32-data-gen/src/chips.rs index 6b03e78..4aa152c 100644 --- a/stm32-data-gen/src/chips.rs +++ b/stm32-data-gen/src/chips.rs @@ -380,6 +380,7 @@ impl PeriMatcher { (".*:LCD:lcdc1_v1.0.*", ("lcd", "v1", "LCD")), (".*:LCD:lcdc1_v1.2.*", ("lcd", "v2", "LCD")), (".*:LCD:lcdc1_v1.3.*", ("lcd", "v2", "LCD")), + (".*:UID:.*", ("uid", "v1", "UID")), ]; Self { @@ -742,6 +743,7 @@ fn process_core( .collect(); interrupts.sort_unstable_by_key(|x| x.number); let mut peri_kinds = HashMap::new(); + peri_kinds.insert("UID".to_string(), "UID".to_string()); for ip in group.ips.values() { let pname = ip.instance_name.clone(); let pkind = format!("{}:{}", ip.name, ip.version);