stm32l1: desig: use new mechanism to support different densities

Fixes: https://github.com/libopencm3/libopencm3/issues/234

uses the new mechanisms introduced to address a similar problem on F7.

Tested on a medium density part (0x429) that returns the same ids as
before, tested on a high density part that now _doesnt_, but that's now
correct :)
This commit is contained in:
Karl Palsson
2020-03-04 22:32:58 +00:00
parent 78c23ba5a0
commit 4a11e354a3
3 changed files with 70 additions and 6 deletions

View File

@@ -107,11 +107,10 @@
#define AES_BASE (PERIPH_BASE + 0x10000000)
/* Device Electronic Signature */
#define DESIG_FLASH_SIZE_BASE (INFO_BASE + 0x8004C)
#define DESIG_UNIQUE_ID_BASE (INFO_BASE + 0x80050)
#define DESIG_UNIQUE_ID0 MMIO32(DESIG_UNIQUE_ID_BASE)
#define DESIG_UNIQUE_ID1 MMIO32(DESIG_UNIQUE_ID_BASE + 4)
#define DESIG_UNIQUE_ID2 MMIO32(DESIG_UNIQUE_ID_BASE + 0x14)
#define DESIG_FLASH_SIZE_BASE_CAT12 (INFO_BASE + 0x8004C)
#define DESIG_FLASH_SIZE_BASE_CAT3456 (INFO_BASE + 0x800CC)
#define DESIG_UNIQUE_ID_BASE_CAT12 (INFO_BASE + 0x80050)
#define DESIG_UNIQUE_ID_BASE_CAT3456 (INFO_BASE + 0x800D0)
/* ST provided factory calibration values @ 3.0V */
#define ST_VREFINT_CAL MMIO16(0x1FF80078)