+ device identification
This commit is contained in:
parent
bf814c6ed8
commit
c39c2981d1
|
@ -9,6 +9,9 @@ package STM32.Address_Map is
|
|||
CCM_RAM : constant Address := To_Address (16#1000_0000#);
|
||||
Option_Bytes : constant Address := To_Address (16#1FFE_C000#);
|
||||
System_Memory : constant Address := To_Address (16#1FFF_0000#);
|
||||
Unique_Id : constant Address := System_Memory + 16#7A10#;
|
||||
Flash_Size : constant Address := System_Memory + 16#7A22#;
|
||||
Package_Id : constant Address := System_Memory + 16#7BF0#;
|
||||
Option_Bytes_2 : constant Address := To_Address (16#1FFF_C000#);
|
||||
SRAM_1 : constant Address := To_Address (16#2000_0000#);
|
||||
SRAM_2 : constant Address := To_Address (16#2001_C000#);
|
||||
|
|
|
@ -1,26 +1,14 @@
|
|||
with STM32.Device_IDs;
|
||||
with STM32.Address_Map;
|
||||
|
||||
-- Debug support
|
||||
|
||||
package STM32.Debug is
|
||||
|
||||
-- IDCODE
|
||||
|
||||
type Device_ID is mod 2**12;
|
||||
|
||||
DEV_ID_STM32F405 : constant Device_ID := 16#413#;
|
||||
DEV_ID_STM32F407 : constant Device_ID := 16#413#;
|
||||
DEV_ID_STM32F415 : constant Device_ID := 16#413#;
|
||||
DEV_ID_STM32F417 : constant Device_ID := 16#413#;
|
||||
DEV_ID_STM32F427 : constant Device_ID := 16#419#;
|
||||
DEV_ID_STM32F429 : constant Device_ID := 16#419#;
|
||||
DEV_ID_STM32F437 : constant Device_ID := 16#419#;
|
||||
DEV_ID_STM32F439 : constant Device_ID := 16#419#;
|
||||
|
||||
type Revision_ID is range 0 .. 2**16 - 1;
|
||||
|
||||
type Device_ID_Register is record
|
||||
DEV_ID : Device_ID; -- Device identifier
|
||||
DEV_ID : Device_IDs.Device_ID; -- Device identifier
|
||||
Unused_12 : Unused_4_Bits;
|
||||
REV_ID : Revision_ID; -- Revision identifier
|
||||
end record with Size => 32;
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
package STM32.Device_IDs with Pure is
|
||||
|
||||
-- Device identifiers are retrived through DBG unit.
|
||||
-- See Debug package.
|
||||
|
||||
type Device_ID is mod 2**12;
|
||||
|
||||
-- IDCODE
|
||||
STM32F4x5_4x7 : constant Device_ID := 16#413#;
|
||||
STM32F405 : constant Device_ID := STM32F4x5_4x7;
|
||||
STM32F407 : constant Device_ID := STM32F4x5_4x7;
|
||||
STM32F415 : constant Device_ID := STM32F4x5_4x7;
|
||||
STM32F417 : constant Device_ID := STM32F4x5_4x7;
|
||||
STM32F42x_43x : constant Device_ID := 16#419#;
|
||||
STM32F427 : constant Device_ID := STM32F42x_43x;
|
||||
STM32F429 : constant Device_ID := STM32F42x_43x;
|
||||
STM32F437 : constant Device_ID := STM32F42x_43x;
|
||||
STM32F439 : constant Device_ID := STM32F42x_43x;
|
||||
STM32F446 : constant Device_ID := 16#421#;
|
||||
STM32F401xB_xC : constant Device_ID := 16#423#;
|
||||
STM32F401xD_xE : constant Device_ID := 16#433#;
|
||||
STM32F411xC_xE : constant Device_ID := 16#431#;
|
||||
STM32F46x_F47x : constant Device_ID := 16#434#;
|
||||
STM32F412 : constant Device_ID := 16#441#;
|
||||
STM32F410 : constant Device_ID := 16#458#;
|
||||
STM32F413_F423 : constant Device_ID := 16#463#;
|
||||
STM32F413 : constant Device_ID := STM32F413_F423;
|
||||
STM32F423 : constant Device_ID := STM32F413_F423;
|
||||
|
||||
end STM32.Device_IDs;
|
Loading…
Reference in New Issue