From f8475fc2e82f4ebf5f4c6a73ec889c28e365bf8f Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Fri, 7 Jan 2022 10:53:56 +0000 Subject: stm32wb: cal: add Flash UID64 At least the constants to get started. Note that RM0434r8 says that 0x27 is for revision "B" but rev9 says it's not revision "X" (Presumably B nomenclature has been dropped?) --- cal/cal.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cal/cal.h') diff --git a/cal/cal.h b/cal/cal.h index 323887b..7518baa 100644 --- a/cal/cal.h +++ b/cal/cal.h @@ -18,6 +18,14 @@ namespace STM32 { static auto const VREFINT_CAL_TEMP = 30; static auto const VREFINT_CAL_VOLTAGE = 3.6f; static auto const VREFINT_MIN_SAMPLING_USECS = 4; + + /* A 32bit unique sequence for each device */ + static uint32_t& UID64_UDN = *(uint32_t*) 0x1fff7580; + /* 24 bit vendor id, and an 8 bit part id, */ + static uint32_t& UID64_PART = *(uint32_t*) 0x1fff7584; + static auto const UID64_VENDOR_ST = 0x0080E1; + static auto const UID64_PART_STM32WB_REV_YA = 0x26; + static auto const UID64_PART_STM32WB_REV_XB = 0x27; #endif } -- cgit v1.2.3