summaryrefslogtreecommitdiff
path: root/cal
diff options
context:
space:
mode:
authorKarl Palsson <karlp@etactica.com>2021-09-28 16:32:33 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2022-01-26 23:40:29 +0100
commitd205055dacbb11ee6e7ff6984b69e79cde564686 (patch)
tree5c766a7ed73885281aad873001c5a65b85f35da4 /cal
parentdb8607216cf2d75fdf77aec524c6af91984ca48d (diff)
cal: basic temp/vrefint consts
No API, just pointers to the calibration data and their associated constants.
Diffstat (limited to 'cal')
-rw-r--r--cal/cal.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/cal/cal.h b/cal/cal.h
new file mode 100644
index 0000000..323887b
--- /dev/null
+++ b/cal/cal.h
@@ -0,0 +1,24 @@
+#pragma once
+/**
+ * Calibration helpers, offsets for ROM calibration variables and similar
+ */
+
+namespace STM32 {
+ namespace Calibration {
+
+#if defined(STM32WB)
+ static auto const TS_CAL1_TEMP = 30;
+ static uint16_t& TS_CAL1 = *(uint16_t*) 0x1FFF75A8;
+ static auto const TS_CAL2_TEMP = 130;
+ static uint16_t& TS_CAL2 = *(uint16_t*) 0x1FFF75cA;
+ static auto const TS_CAL_VOLTAGE = 3.0f;
+ static auto const TS_MIN_SAMPLING_USECS = 5;
+
+ static uint16_t& VREFINT_CAL = *(uint16_t*) 0x1FFF75AA;
+ static auto const VREFINT_CAL_TEMP = 30;
+ static auto const VREFINT_CAL_VOLTAGE = 3.6f;
+ static auto const VREFINT_MIN_SAMPLING_USECS = 4;
+#endif
+
+ }
+} \ No newline at end of file