Skip to content

Commit

Permalink
[stm32] Add Factory Calibration values where available
Browse files Browse the repository at this point in the history
Add memorymap entries for ST calibration data, the vref internal, and the temp
sensor at 30C and 110C for the parts that provide this data.

F1 and F2 do not appear to have this anywhere.
  • Loading branch information
karlp committed Dec 4, 2013
1 parent 50daf0e commit 638eeeb
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/libopencm3/stm32/f0/memorymap.h
Expand Up @@ -99,4 +99,9 @@
#define DESIG_UNIQUE_ID1 MMIO32(DESIG_UNIQUE_ID_BASE + 4)
#define DESIG_UNIQUE_ID2 MMIO32(DESIG_UNIQUE_ID_BASE + 8)

/* ST provided factory calibration values @ 3.3V */
#define ST_VREFINT_CAL MMIO16(0x1FFFF7BA)
#define ST_TSENSE_CAL1_30C MMIO16(0x1FFFF7B8)
#define ST_TSENSE_CAL2_110 MMIO16(0x1FFFF7C2)

#endif
5 changes: 5 additions & 0 deletions include/libopencm3/stm32/f3/memorymap.h
Expand Up @@ -121,4 +121,9 @@
#define DESIG_UNIQUE_ID1 MMIO32(DESIG_UNIQUE_ID_BASE + 4)
#define DESIG_UNIQUE_ID2 MMIO32(DESIG_UNIQUE_ID_BASE + 8)

/* ST provided factory calibration values @ 3.3V */
#define ST_VREFINT_CAL MMIO16(0x1FFFF7BA)
#define ST_TSENSE_CAL1_30C MMIO16(0x1FFFF7B8)
#define ST_TSENSE_CAL2_110 MMIO16(0x1FFFF7C2)

#endif
5 changes: 5 additions & 0 deletions include/libopencm3/stm32/f4/memorymap.h
Expand Up @@ -139,4 +139,9 @@
#define DESIG_UNIQUE_ID1 MMIO32(DESIG_UNIQUE_ID_BASE + 4)
#define DESIG_UNIQUE_ID2 MMIO32(DESIG_UNIQUE_ID_BASE + 8)

/* ST provided factory calibration values @ 3.3V */
#define ST_VREFINT_CAL MMIO16(0x1FFF7A2A)
#define ST_TSENSE_CAL1_30C MMIO16(0x1FFF7A2C)
#define ST_TSENSE_CAL2_110 MMIO16(0x1FFF7A2E)

#endif
5 changes: 5 additions & 0 deletions include/libopencm3/stm32/l1/memorymap.h
Expand Up @@ -111,6 +111,11 @@
#define DESIG_UNIQUE_ID1 MMIO32(DESIG_UNIQUE_ID_BASE + 4)
#define DESIG_UNIQUE_ID2 MMIO32(DESIG_UNIQUE_ID_BASE + 0x14)

/* ST provided factory calibration values @ 3.0V */
#define ST_VREFINT_CAL MMIO16(0x1FF80078)
#define ST_TSENSE_CAL1_30C MMIO16(0x1FF8007A)
#define ST_TSENSE_CAL2_110C MMIO16(0x1FF8007E)

/* Make the map names match those for other families to allow commonality */
#define SPI1_I2S_BASE SPI1_BASE
#define SPI2_I2S_BASE SPI2_BASE
Expand Down

0 comments on commit 638eeeb

Please sign in to comment.