* Values in address map got Address type
This commit is contained in:
parent
f3deff5349
commit
cb7eefc45d
|
@ -1,9 +1,11 @@
|
|||
with System, System.Storage_Elements;
|
||||
use System, System.Storage_Elements;
|
||||
with STM32.Address_Map;
|
||||
|
||||
package Board.Memory is
|
||||
pragma Elaborate_Body;
|
||||
|
||||
Memory_Base : constant := STM32.Address_Map.FMC_Bank_6;
|
||||
Memory_Base : constant Address := STM32.Address_Map.FMC_Bank_6;
|
||||
|
||||
Memory_Size : constant := 64 * 1024**2; -- 64 Mbit
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ use System.Storage_Elements;
|
|||
package Pixels is
|
||||
|
||||
SDRAM_Pool : Simple_Pool := Make_Simple_Pool (
|
||||
To_Address (Board.Memory.Memory_Base),
|
||||
Board.Memory.Memory_Base,
|
||||
Board.Memory.Memory_Size / System.Storage_Unit);
|
||||
|
||||
type Pixel_Array is array (Integer range <>, Integer range <>) of aliased STM32.Graphics.RGB888_Pixel with Component_Size => 24;
|
||||
|
|
|
@ -3,11 +3,11 @@ use STM32.General_Purpose_IOs.Ports;
|
|||
with Board; use Board;
|
||||
with Board.UART.IO;
|
||||
with Board.Memory; -- SDRAM initialization is here!
|
||||
with STM32.Address_Map;
|
||||
|
||||
with Ada.Real_Time; use Ada.Real_Time;
|
||||
with Interfaces; use Interfaces;
|
||||
with System;
|
||||
with System, System.Storage_Elements;
|
||||
use System, System.Storage_Elements;
|
||||
|
||||
procedure SDRAM_Test is
|
||||
|
||||
|
@ -15,7 +15,7 @@ procedure SDRAM_Test is
|
|||
|
||||
type Test_Type is array (Integer range 0 .. Board.Memory.Memory_Size / 32 - 1) of Unsigned_32 with Size => Board.Memory.Memory_Size;
|
||||
|
||||
M : Test_Type with Import, Address => System'To_Address(Board.Memory.Memory_Base);
|
||||
M : Test_Type with Import, Address => Board.Memory.Memory_Base;
|
||||
|
||||
package LED is new GPIO_Port_Boolean (LED_Port, LED_Bit);
|
||||
|
||||
|
|
|
@ -1,118 +1,121 @@
|
|||
package STM32.Address_Map with Pure is
|
||||
with System.Storage_Elements;
|
||||
use System.Storage_Elements, System;
|
||||
|
||||
package STM32.Address_Map is
|
||||
|
||||
-- Regions / memories
|
||||
Aliased_Memory : constant := 16#0000_0000#;
|
||||
Flash_Memory : constant := 16#0800_0000#;
|
||||
CCM_RAM : constant := 16#1000_0000#;
|
||||
Option_Bytes : constant := 16#1FFE_C000#;
|
||||
System_Memory : constant := 16#1FFF_0000#;
|
||||
Option_Bytes_2 : constant := 16#1FFF_C000#;
|
||||
SRAM_1 : constant := 16#2000_0000#;
|
||||
SRAM_2 : constant := 16#2001_C000#;
|
||||
SRAM_3 : constant := 16#2002_0000#;
|
||||
Aliased_Memory : constant Address := To_Address (16#0000_0000#);
|
||||
Flash_Memory : constant Address := To_Address (16#0800_0000#);
|
||||
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#);
|
||||
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#);
|
||||
SRAM_3 : constant Address := To_Address (16#2002_0000#);
|
||||
|
||||
-- APB1
|
||||
APB1 : constant := 16#4000_0000#;
|
||||
TIM2 : constant := 16#4000_0000#;
|
||||
TIM3 : constant := 16#4000_0400#;
|
||||
TIM4 : constant := 16#4000_0800#;
|
||||
TIM5 : constant := 16#4000_0C00#;
|
||||
TIM6 : constant := 16#4000_1000#;
|
||||
TIM7 : constant := 16#4000_1400#;
|
||||
TIM12 : constant := 16#4000_1800#;
|
||||
TIM13 : constant := 16#4000_1C00#;
|
||||
TIM14 : constant := 16#4000_2000#;
|
||||
RTC_and_BKP : constant := 16#4000_2800#;
|
||||
WWDG : constant := 16#4000_2C00#;
|
||||
IWDG : constant := 16#4000_3000#;
|
||||
I2S2ext : constant := 16#4000_3400#;
|
||||
SPI2_I2S2 : constant := 16#4000_3800#;
|
||||
SPI3_I2S3 : constant := 16#4000_3C00#;
|
||||
I2S3ext : constant := 16#4000_4000#;
|
||||
USART2 : constant := 16#4000_4400#;
|
||||
USART3 : constant := 16#4000_4800#;
|
||||
UART4 : constant := 16#4000_4C00#;
|
||||
UART5 : constant := 16#4000_5000#;
|
||||
I2C1 : constant := 16#4000_5400#;
|
||||
I2C2 : constant := 16#4000_5800#;
|
||||
I2C3 : constant := 16#4000_5C00#;
|
||||
FMPI2C1 : constant := 16#4000_6000#;
|
||||
CAN1 : constant := 16#4000_6400#;
|
||||
CAN2 : constant := 16#4000_6800#;
|
||||
CAN3 : constant := 16#4000_6C00#;
|
||||
PWR : constant := 16#4000_7000#;
|
||||
DAC : constant := 16#4000_7400#;
|
||||
UART7 : constant := 14#4000_7800#;
|
||||
UART8 : constant := 14#4000_7C00#;
|
||||
APB1 : constant Address := To_Address (16#4000_0000#);
|
||||
TIM2 : constant Address := APB1 + 16#0000#;
|
||||
TIM3 : constant Address := APB1 + 16#0400#;
|
||||
TIM4 : constant Address := APB1 + 16#0800#;
|
||||
TIM5 : constant Address := APB1 + 16#0C00#;
|
||||
TIM6 : constant Address := APB1 + 16#1000#;
|
||||
TIM7 : constant Address := APB1 + 16#1400#;
|
||||
TIM12 : constant Address := APB1 + 16#1800#;
|
||||
TIM13 : constant Address := APB1 + 16#1C00#;
|
||||
TIM14 : constant Address := APB1 + 16#2000#;
|
||||
RTC_and_BKP : constant Address := APB1 + 16#2800#;
|
||||
WWDG : constant Address := APB1 + 16#2C00#;
|
||||
IWDG : constant Address := APB1 + 16#3000#;
|
||||
I2S2ext : constant Address := APB1 + 16#3400#;
|
||||
SPI2_I2S2 : constant Address := APB1 + 16#3800#;
|
||||
SPI3_I2S3 : constant Address := APB1 + 16#3C00#;
|
||||
I2S3ext : constant Address := APB1 + 16#4000#;
|
||||
USART2 : constant Address := APB1 + 16#4400#;
|
||||
USART3 : constant Address := APB1 + 16#4800#;
|
||||
UART4 : constant Address := APB1 + 16#4C00#;
|
||||
UART5 : constant Address := APB1 + 16#5000#;
|
||||
I2C1 : constant Address := APB1 + 16#5400#;
|
||||
I2C2 : constant Address := APB1 + 16#5800#;
|
||||
I2C3 : constant Address := APB1 + 16#5C00#;
|
||||
FMPI2C1 : constant Address := APB1 + 16#6000#;
|
||||
CAN1 : constant Address := APB1 + 16#6400#;
|
||||
CAN2 : constant Address := APB1 + 16#6800#;
|
||||
CAN3 : constant Address := APB1 + 16#6C00#;
|
||||
PWR : constant Address := APB1 + 16#7000#;
|
||||
DAC : constant Address := APB1 + 16#7400#;
|
||||
UART7 : constant Address := APB1 + 16#7800#;
|
||||
UART8 : constant Address := APB1 + 16#7C00#;
|
||||
|
||||
-- APB2
|
||||
APB2 : constant := 16#4001_0000#;
|
||||
TIM1 : constant := 16#4001_0000#;
|
||||
TIM8 : constant := 16#4001_0400#;
|
||||
USART1 : constant := 16#4001_1000#;
|
||||
USART6 : constant := 16#4001_1400#;
|
||||
UART9 : constant := 16#4001_1800#;
|
||||
UART10 : constant := 16#4001_1C00#;
|
||||
ADC1 : constant := 16#4001_2000#;
|
||||
ADC2 : constant := 16#4001_2100#;
|
||||
ADC3 : constant := 16#4001_2200#;
|
||||
ADC_Common : constant := 16#4001_2300#;
|
||||
SDIO : constant := 16#4001_2C00#;
|
||||
SPI1 : constant := 16#4001_3000#;
|
||||
SPI4 : constant := 16#4001_3400#;
|
||||
SYSCFG : constant := 16#4001_3800#;
|
||||
EXTI : constant := 16#4001_3C00#;
|
||||
TIM9 : constant := 16#4001_4000#;
|
||||
TIM10 : constant := 16#4001_4400#;
|
||||
TIM11 : constant := 16#4001_4800#;
|
||||
SPI5 : constant := 16#4001_5000#;
|
||||
SPI6 : constant := 16#4001_5400#;
|
||||
SAI1 : constant := 16#4001_5800#;
|
||||
LTDC : constant := 16#4001_6800#;
|
||||
APB2 : constant Address := To_Address (16#4001_0000#);
|
||||
TIM1 : constant Address := APB2 + 16#0000#;
|
||||
TIM8 : constant Address := APB2 + 16#0400#;
|
||||
USART1 : constant Address := APB2 + 16#1000#;
|
||||
USART6 : constant Address := APB2 + 16#1400#;
|
||||
UART9 : constant Address := APB2 + 16#1800#;
|
||||
UART10 : constant Address := APB2 + 16#1C00#;
|
||||
ADC1 : constant Address := APB2 + 16#2000#;
|
||||
ADC2 : constant Address := APB2 + 16#2100#;
|
||||
ADC3 : constant Address := APB2 + 16#2200#;
|
||||
ADC_Common : constant Address := APB2 + 16#2300#;
|
||||
SDIO : constant Address := APB2 + 16#2C00#;
|
||||
SPI1 : constant Address := APB2 + 16#3000#;
|
||||
SPI4 : constant Address := APB2 + 16#3400#;
|
||||
SYSCFG : constant Address := APB2 + 16#3800#;
|
||||
EXTI : constant Address := APB2 + 16#3C00#;
|
||||
TIM9 : constant Address := APB2 + 16#4000#;
|
||||
TIM10 : constant Address := APB2 + 16#4400#;
|
||||
TIM11 : constant Address := APB2 + 16#4800#;
|
||||
SPI5 : constant Address := APB2 + 16#5000#;
|
||||
SPI6 : constant Address := APB2 + 16#5400#;
|
||||
SAI1 : constant Address := APB2 + 16#5800#;
|
||||
LTDC : constant Address := APB2 + 16#6800#;
|
||||
|
||||
-- AHB1
|
||||
AHB1 : constant := 16#4002_0000#;
|
||||
GPIOA : constant := 16#4002_0000#;
|
||||
GPIOB : constant := 16#4002_0400#;
|
||||
GPIOC : constant := 16#4002_0800#;
|
||||
GPIOD : constant := 16#4002_0C00#;
|
||||
GPIOE : constant := 16#4002_1000#;
|
||||
GPIOF : constant := 16#4002_1400#;
|
||||
GPIOG : constant := 16#4002_1800#;
|
||||
GPIOH : constant := 16#4002_1C00#;
|
||||
GPIOI : constant := 16#4002_2000#;
|
||||
GPIOJ : constant := 16#4002_2400#;
|
||||
GPIOK : constant := 16#4002_2800#;
|
||||
CRC : constant := 16#4002_3000#;
|
||||
RCC : constant := 16#4002_3800#;
|
||||
Flash_IR : constant := 16#4002_3C00#;
|
||||
BKPSRAM : constant := 16#4002_4000#;
|
||||
DMA1 : constant := 16#4002_6000#;
|
||||
DMA2 : constant := 16#4002_6400#;
|
||||
Ethernet_MAC : constant := 16#4002_8000#;
|
||||
DMA2D : constant := 16#4002_B000#;
|
||||
USB_OTG_HS : constant := 16#4004_0000#;
|
||||
AHB1 : constant Address := To_Address (16#4002_0000#);
|
||||
GPIOA : constant Address := AHB1 + 16#0000#;
|
||||
GPIOB : constant Address := AHB1 + 16#0400#;
|
||||
GPIOC : constant Address := AHB1 + 16#0800#;
|
||||
GPIOD : constant Address := AHB1 + 16#0C00#;
|
||||
GPIOE : constant Address := AHB1 + 16#1000#;
|
||||
GPIOF : constant Address := AHB1 + 16#1400#;
|
||||
GPIOG : constant Address := AHB1 + 16#1800#;
|
||||
GPIOH : constant Address := AHB1 + 16#1C00#;
|
||||
GPIOI : constant Address := AHB1 + 16#2000#;
|
||||
GPIOJ : constant Address := AHB1 + 16#2400#;
|
||||
GPIOK : constant Address := AHB1 + 16#2800#;
|
||||
CRC : constant Address := AHB1 + 16#3000#;
|
||||
RCC : constant Address := AHB1 + 16#3800#;
|
||||
Flash_IR : constant Address := AHB1 + 16#3C00#;
|
||||
BKPSRAM : constant Address := AHB1 + 16#4000#;
|
||||
DMA1 : constant Address := AHB1 + 16#6000#;
|
||||
DMA2 : constant Address := AHB1 + 16#6400#;
|
||||
Ethernet_MAC : constant Address := AHB1 + 16#8000#;
|
||||
DMA2D : constant Address := AHB1 + 16#B000#;
|
||||
USB_OTG_HS : constant Address := AHB1 + 16#2_0000#;
|
||||
|
||||
-- AHB2
|
||||
AHB2 : constant := 16#5000_0000#;
|
||||
USB_OTG_FS : constant := 16#5000_0000#;
|
||||
DCMI : constant := 16#5005_0000#;
|
||||
CRYP : constant := 16#5006_0000#;
|
||||
HASH : constant := 16#5006_0400#;
|
||||
RNG : constant := 16#5006_0800#;
|
||||
AHB2 : constant Address := To_Address (16#5000_0000#);
|
||||
USB_OTG_FS : constant Address := AHB2 + 16#0_0000#;
|
||||
DCMI : constant Address := AHB2 + 16#5_0000#;
|
||||
CRYP : constant Address := AHB2 + 16#6_0000#;
|
||||
HASH : constant Address := AHB2 + 16#6_0400#;
|
||||
RNG : constant Address := AHB2 + 16#6_0800#;
|
||||
|
||||
-- AHB 3
|
||||
AHB3 : constant := 16#6000_0000#;
|
||||
FMC_Bank_1 : constant := 16#6000_0000#;
|
||||
FSMC_Bank1_1 : constant := 16#6000_0000#;
|
||||
FSMC_Bank1_2 : constant := 16#6400_0000#;
|
||||
FSMC_Bank1_3 : constant := 16#6800_0000#;
|
||||
FSMC_Bank1_4 : constant := 16#6C00_0000#;
|
||||
FMC_Bank_2 : constant := 16#7000_0000#;
|
||||
FMC_Bank_3 : constant := 16#8000_0000#;
|
||||
FMC_Bank_4 : constant := 16#9000_0000#;
|
||||
FMC_FSMC : constant := 16#A000_0000#;
|
||||
FMC_Bank_5 : constant := 16#C000_0000#;
|
||||
FMC_Bank_6 : constant := 16#D000_0000#;
|
||||
AHB3 : constant Address := To_Address (16#6000_0000#);
|
||||
FMC_Bank_1 : constant Address := To_Address (16#6000_0000#);
|
||||
FSMC_Bank1_1 : constant Address := To_Address (16#6000_0000#);
|
||||
FSMC_Bank1_2 : constant Address := To_Address (16#6400_0000#);
|
||||
FSMC_Bank1_3 : constant Address := To_Address (16#6800_0000#);
|
||||
FSMC_Bank1_4 : constant Address := To_Address (16#6C00_0000#);
|
||||
FMC_Bank_2 : constant Address := To_Address (16#7000_0000#);
|
||||
FMC_Bank_3 : constant Address := To_Address (16#8000_0000#);
|
||||
FMC_Bank_4 : constant Address := To_Address (16#9000_0000#);
|
||||
FMC_FSMC : constant Address := To_Address (16#A000_0000#);
|
||||
FMC_Bank_5 : constant Address := To_Address (16#C000_0000#);
|
||||
FMC_Bank_6 : constant Address := To_Address (16#D000_0000#);
|
||||
|
||||
end STM32.Address_Map;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
with System.Storage_Elements;
|
||||
with STM32.Address_Map;
|
||||
|
||||
-- Analog to Digital Convertors
|
||||
|
@ -531,16 +530,9 @@ package STM32.Analog_to_Digital_Convertors is
|
|||
CDR at 16#08# range 0 .. 31;
|
||||
end record;
|
||||
|
||||
ADC1 : aliased ADC_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.ADC1);
|
||||
|
||||
ADC2 : aliased ADC_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.ADC2);
|
||||
|
||||
ADC3 : aliased ADC_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.ADC3);
|
||||
|
||||
ADC_Common : Common_ADC_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.ADC_Common);
|
||||
ADC1 : aliased ADC_Registers with Volatile, Import, Address => Address_Map.ADC1;
|
||||
ADC2 : aliased ADC_Registers with Volatile, Import, Address => Address_Map.ADC2;
|
||||
ADC3 : aliased ADC_Registers with Volatile, Import, Address => Address_Map.ADC3;
|
||||
ADC_Common : Common_ADC_Registers with Volatile, Import, Address => Address_Map.ADC_Common;
|
||||
|
||||
end STM32.Analog_to_Digital_Convertors;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
with System.Storage_Elements;
|
||||
with STM32.Address_Map;
|
||||
|
||||
-- Controller Area Network Interfaces
|
||||
|
@ -533,13 +532,8 @@ package STM32.CANs is
|
|||
FR at 16#0240# range 0 .. 32 * 2 * 28 - 1;
|
||||
end record;
|
||||
|
||||
CAN1 : aliased CAN_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.CAN1);
|
||||
|
||||
CAN2 : aliased CAN_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.CAN2);
|
||||
|
||||
CAN3 : aliased CAN_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.CAN3);
|
||||
CAN1 : aliased CAN_Registers with Volatile, Import, Address => Address_Map.CAN1;
|
||||
CAN2 : aliased CAN_Registers with Volatile, Import, Address => Address_Map.CAN2;
|
||||
CAN3 : aliased CAN_Registers with Volatile, Import, Address => Address_Map.CAN3;
|
||||
|
||||
end STM32.CANs;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
with System.Storage_Elements;
|
||||
with STM32.Address_Map;
|
||||
|
||||
-- CRC Calculation Unit
|
||||
|
@ -44,7 +43,6 @@ package STM32.CRC_Calculation is
|
|||
CR at 16#08# range 0 .. 31;
|
||||
end record;
|
||||
|
||||
CRC : CRC_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.CRC);
|
||||
CRC : CRC_Registers with Volatile, Import, Address => Address_Map.CRC;
|
||||
|
||||
end STM32.CRC_Calculation;
|
|
@ -1,4 +1,3 @@
|
|||
with System.Storage_Elements;
|
||||
with STM32.Address_Map;
|
||||
|
||||
-- Cryptographic Processor
|
||||
|
@ -236,7 +235,6 @@ package STM32.Cryptographic_Processor is
|
|||
CSGCMR at 16#70# range 0 .. 32 * 8 - 1;
|
||||
end record;
|
||||
|
||||
CRYP : CRYP_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.CRYP);
|
||||
CRYP : CRYP_Registers with Volatile, Import, Address => Address_Map.CRYP;
|
||||
|
||||
end STM32.Cryptographic_Processor;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
with System.Storage_Elements;
|
||||
with STM32.Address_Map;
|
||||
|
||||
-- Digital Camera Interface
|
||||
|
@ -251,7 +250,6 @@ package STM32.Digital_Camera_Interface is
|
|||
DR at 16#28# range 0 .. 31;
|
||||
end record;
|
||||
|
||||
DCMI : DCMI_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.DCMI);
|
||||
DCMI : DCMI_Registers with Volatile, Import, Address => Address_Map.DCMI;
|
||||
|
||||
end STM32.Digital_Camera_Interface;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
with System.Storage_Elements;
|
||||
with STM32.Address_Map;
|
||||
|
||||
-- Digital to Analog Convertors
|
||||
|
@ -180,7 +179,6 @@ package STM32.Digital_to_Analog_Convertors is
|
|||
SR at 16#34# range 0 .. 31;
|
||||
end record;
|
||||
|
||||
DAC : DAC_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.DAC);
|
||||
DAC : DAC_Registers with Volatile, Import, Address => Address_Map.DAC;
|
||||
|
||||
end STM32.Digital_to_Analog_Convertors;
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
with System.Storage_Elements;
|
||||
with STM32.Address_Map;
|
||||
|
||||
-- External Interrupts and Events Controller
|
||||
|
||||
package STM32.External_Interrupts with Preelaborate is
|
||||
package STM32.External_Interrupts is
|
||||
|
||||
subtype Line_Number is Integer range 0 .. 31;
|
||||
package Lines is
|
||||
|
@ -45,7 +44,6 @@ package STM32.External_Interrupts with Preelaborate is
|
|||
PR at 16#14# range 0 .. 31;
|
||||
end record;
|
||||
|
||||
EXTI : EXTI_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.EXTI);
|
||||
EXTI : EXTI_Registers with Volatile, Import, Address => Address_Map.EXTI;
|
||||
|
||||
end STM32.External_Interrupts;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
with System.Storage_Elements;
|
||||
with STM32.Address_Map;
|
||||
with STM32.General_Purpose_IOs;
|
||||
|
||||
|
@ -6,31 +5,14 @@ package STM32.F407.General_Purpose_IOs is
|
|||
|
||||
package GPIO_Base renames STM32.General_Purpose_IOs;
|
||||
|
||||
GPIOA : GPIO_Base.GPIO_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.GPIOA);
|
||||
|
||||
GPIOB : GPIO_Base.GPIO_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.GPIOB);
|
||||
|
||||
GPIOC : GPIO_Base.GPIO_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.GPIOC);
|
||||
|
||||
GPIOD : GPIO_Base.GPIO_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.GPIOD);
|
||||
|
||||
GPIOE : GPIO_Base.GPIO_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.GPIOE);
|
||||
|
||||
GPIOF : GPIO_Base.GPIO_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.GPIOF);
|
||||
|
||||
GPIOG : GPIO_Base.GPIO_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.GPIOG);
|
||||
|
||||
GPIOH : GPIO_Base.GPIO_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.GPIOH);
|
||||
|
||||
GPIOI : GPIO_Base.GPIO_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.GPIOI);
|
||||
GPIOA : GPIO_Base.GPIO_Registers with Volatile, Import,Address => Address_Map.GPIOA;
|
||||
GPIOB : GPIO_Base.GPIO_Registers with Volatile, Import, Address => Address_Map.GPIOB;
|
||||
GPIOC : GPIO_Base.GPIO_Registers with Volatile, Import, Address => Address_Map.GPIOC;
|
||||
GPIOD : GPIO_Base.GPIO_Registers with Volatile, Import, Address => Address_Map.GPIOD;
|
||||
GPIOE : GPIO_Base.GPIO_Registers with Volatile, Import, Address => Address_Map.GPIOE;
|
||||
GPIOF : GPIO_Base.GPIO_Registers with Volatile, Import, Address => Address_Map.GPIOF;
|
||||
GPIOG : GPIO_Base.GPIO_Registers with Volatile, Import, Address => Address_Map.GPIOG;
|
||||
GPIOH : GPIO_Base.GPIO_Registers with Volatile, Import, Address => Address_Map.GPIOH;
|
||||
GPIOI : GPIO_Base.GPIO_Registers with Volatile, Import, Address => Address_Map.GPIOI;
|
||||
|
||||
end STM32.F407.General_Purpose_IOs;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
with System.Storage_Elements;
|
||||
with STM32.Address_Map;
|
||||
|
||||
package STM32.F407.RTC is
|
||||
|
@ -522,8 +521,7 @@ package STM32.F407.RTC is
|
|||
|
||||
end Base;
|
||||
|
||||
RTC_HW : Base.RTC_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (Address_Map.RTC_and_BKP);
|
||||
RTC : Base.RTC_Registers with Volatile, Import, Address => Address_Map.RTC_and_BKP;
|
||||
|
||||
end STM32.F407.RTC;
|
||||
|
||||
|
|
|
@ -6,37 +6,16 @@ package STM32.F429.General_Purpose_IOs is
|
|||
|
||||
package GPIO_Base renames STM32.General_Purpose_IOs;
|
||||
|
||||
GPIOA : GPIO_Base.GPIO_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.GPIOA);
|
||||
|
||||
GPIOB : GPIO_Base.GPIO_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.GPIOB);
|
||||
|
||||
GPIOC : GPIO_Base.GPIO_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.GPIOC);
|
||||
|
||||
GPIOD : GPIO_Base.GPIO_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.GPIOD);
|
||||
|
||||
GPIOE : GPIO_Base.GPIO_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.GPIOE);
|
||||
|
||||
GPIOF : GPIO_Base.GPIO_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.GPIOF);
|
||||
|
||||
GPIOG : GPIO_Base.GPIO_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.GPIOG);
|
||||
|
||||
GPIOH : GPIO_Base.GPIO_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.GPIOH);
|
||||
|
||||
GPIOI : GPIO_Base.GPIO_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.GPIOI);
|
||||
|
||||
GPIOJ : GPIO_Base.GPIO_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.GPIOJ);
|
||||
|
||||
GPIOK : GPIO_Base.GPIO_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.GPIOK);
|
||||
GPIOA : GPIO_Base.GPIO_Registers with Volatile, Import,Address => Address_Map.GPIOA;
|
||||
GPIOB : GPIO_Base.GPIO_Registers with Volatile, Import, Address => Address_Map.GPIOB;
|
||||
GPIOC : GPIO_Base.GPIO_Registers with Volatile, Import, Address => Address_Map.GPIOC;
|
||||
GPIOD : GPIO_Base.GPIO_Registers with Volatile, Import, Address => Address_Map.GPIOD;
|
||||
GPIOE : GPIO_Base.GPIO_Registers with Volatile, Import, Address => Address_Map.GPIOE;
|
||||
GPIOF : GPIO_Base.GPIO_Registers with Volatile, Import, Address => Address_Map.GPIOF;
|
||||
GPIOG : GPIO_Base.GPIO_Registers with Volatile, Import, Address => Address_Map.GPIOG;
|
||||
GPIOH : GPIO_Base.GPIO_Registers with Volatile, Import, Address => Address_Map.GPIOH;
|
||||
GPIOI : GPIO_Base.GPIO_Registers with Volatile, Import, Address => Address_Map.GPIOI;
|
||||
GPIOJ : GPIO_Base.GPIO_Registers with Volatile, Import, Address => Address_Map.GPIOJ;
|
||||
GPIOK : GPIO_Base.GPIO_Registers with Volatile, Import, Address => Address_Map.GPIOK;
|
||||
|
||||
end STM32.F429.General_Purpose_IOs;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
with System.Storage_Elements;
|
||||
with STM32.Address_Map;
|
||||
|
||||
-- Fast Mode+ I2C controllers
|
||||
|
@ -300,8 +299,7 @@ package STM32.Fast_Mode_Plus_I2Cs is
|
|||
TXDR at 16#28# range 0 .. 31;
|
||||
end record;
|
||||
|
||||
FMPI2C1 : aliased FMPI2C_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.FMPI2C1);
|
||||
FMPI2C1 : aliased FMPI2C_Registers with Volatile, Import, Address => Address_Map.FMPI2C1;
|
||||
|
||||
I2C4 : FMPI2C_Registers renames FMPI2C1;
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
with System.Storage_Elements;
|
||||
with STM32.Address_Map;
|
||||
|
||||
-- Flexible (Static) Memory Controller
|
||||
|
@ -493,8 +492,7 @@ package STM32.Flexible_Memory_Controller is
|
|||
SDSR at 16#0158# range 0 .. 31;
|
||||
end record;
|
||||
|
||||
FMC : FMC_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.FMC_FSMC);
|
||||
FMC : FMC_Registers with Volatile, Import, Address => Address_Map.FMC_FSMC;
|
||||
|
||||
FSMC : FMC_Registers renames FMC;
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
with System.Storage_Elements;
|
||||
with STM32.Address_Map;
|
||||
with STM32.Graphics;
|
||||
use STM32.Graphics;
|
||||
|
@ -242,7 +241,6 @@ package STM32.Graphic_Accelerator is
|
|||
BGCLUT at 16#0800# range 0 .. 2**8 * 32 - 1;
|
||||
end record;
|
||||
|
||||
DMA2D : DMA2D_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.DMA2D);
|
||||
DMA2D : DMA2D_Registers with Volatile, Import, Address => Address_Map.DMA2D;
|
||||
|
||||
end STM32.Graphic_Accelerator;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
with System.Storage_Elements;
|
||||
with STM32.Address_Map;
|
||||
|
||||
-- Inter-Integrated Circuit Interface Controllers
|
||||
|
@ -281,13 +280,8 @@ package STM32.I2Cs is
|
|||
|
||||
--
|
||||
|
||||
I2C1 : aliased I2C_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.I2C1);
|
||||
|
||||
I2C2 : aliased I2C_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.I2C2);
|
||||
|
||||
I2C3 : aliased I2C_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.I2C3);
|
||||
I2C1 : aliased I2C_Registers with Volatile, Import, Address => Address_Map.I2C1;
|
||||
I2C2 : aliased I2C_Registers with Volatile, Import, Address => Address_Map.I2C2;
|
||||
I2C3 : aliased I2C_Registers with Volatile, Import, Address => Address_Map.I2C3;
|
||||
|
||||
end STM32.I2Cs;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
with System.Storage_Elements;
|
||||
with STM32.Address_Map;
|
||||
|
||||
with STM32.Graphics;
|
||||
|
@ -308,7 +307,6 @@ package STM32.LCD_TFT is
|
|||
L at 16#0080# range 0 .. 2 * 8 * 16#80# - 1;
|
||||
end record;
|
||||
|
||||
LTDC : LTDC_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.LTDC);
|
||||
LTDC : LTDC_Registers with Volatile, Import, Address => Address_Map.LTDC;
|
||||
|
||||
end STM32.LCD_TFT;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
with System.Storage_Elements;
|
||||
with STM32.Address_Map;
|
||||
|
||||
-- Power Controller
|
||||
|
@ -132,7 +131,6 @@ package STM32.Power is
|
|||
CSR at 16#04# range 0 .. 31;
|
||||
end record;
|
||||
|
||||
PWR : PWR_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.PWR);
|
||||
PWR : PWR_Registers with Volatile, Import, Address => Address_Map.PWR;
|
||||
|
||||
end STM32.Power;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
with System.Storage_Elements;
|
||||
with STM32.Address_Map;
|
||||
|
||||
-- Reset and Clock Controller
|
||||
|
@ -680,7 +679,6 @@ package STM32.Reset_and_Clock is
|
|||
DCKCFGR at 16#8C# range 0 .. 31;
|
||||
end record;
|
||||
|
||||
RCC : RCC_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.RCC);
|
||||
RCC : RCC_Registers with Volatile, Import, Address => Address_Map.RCC;
|
||||
|
||||
end STM32.Reset_and_Clock;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
with System.Storage_Elements;
|
||||
with STM32.Address_Map;
|
||||
|
||||
-- SD / SDIO / MMC interface
|
||||
|
@ -306,7 +305,6 @@ package STM32.SDIO_Interface is
|
|||
FIFO at 16#80# range 0 .. 31;
|
||||
end record;
|
||||
|
||||
SDIO : aliased SDIO_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.SDIO);
|
||||
SDIO : aliased SDIO_Registers with Volatile, Import, Address => Address_Map.SDIO;
|
||||
|
||||
end STM32.SDIO_Interface;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
with System.Storage_Elements;
|
||||
with STM32.Address_Map;
|
||||
|
||||
-- Serial Peripherial Interface Controllers
|
||||
|
@ -328,22 +327,22 @@ package STM32.SPIs is
|
|||
end record;
|
||||
|
||||
SPI1 : aliased SPI_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.SPI1);
|
||||
Address => Address_Map.SPI1;
|
||||
|
||||
SPI2 : aliased SPI_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.SPI2_I2S2);
|
||||
Address => Address_Map.SPI2_I2S2;
|
||||
|
||||
SPI3 : aliased SPI_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.SPI3_I2S3);
|
||||
Address => Address_Map.SPI3_I2S3;
|
||||
|
||||
SPI4 : aliased SPI_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.SPI4);
|
||||
Address => Address_Map.SPI4;
|
||||
|
||||
SPI5 : aliased SPI_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.SPI5);
|
||||
Address => Address_Map.SPI5;
|
||||
|
||||
SPI6 : aliased SPI_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.SPI6);
|
||||
Address => Address_Map.SPI6;
|
||||
|
||||
I2S2 : SPI_Registers renames SPI2;
|
||||
I2S3 : SPI_Registers renames SPI3;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
with System.Storage_Elements;
|
||||
with STM32.Address_Map;
|
||||
|
||||
-- System Configuration Controller
|
||||
|
@ -145,6 +144,6 @@ package STM32.System_Configuration is
|
|||
end record;
|
||||
|
||||
SYSCFG : SYSCFG_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address (STM32.Address_Map.SYSCFG);
|
||||
Address => Address_Map.SYSCFG;
|
||||
|
||||
end STM32.System_Configuration;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
with System.Storage_Elements;
|
||||
with STM32.Address_Map;
|
||||
|
||||
-- Timers, Including Basic, General Purpose (both kids) and Advanced Control
|
||||
|
@ -606,47 +605,20 @@ package STM32.Timers is
|
|||
OPTR at 16#50# range 0 .. 15; -- - * - - - * -
|
||||
end record;
|
||||
|
||||
TIM1: aliased Timer_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.TIM1);
|
||||
|
||||
TIM2: aliased Timer_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.TIM2);
|
||||
|
||||
TIM3: aliased Timer_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.TIM3);
|
||||
|
||||
TIM4: aliased Timer_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.TIM4);
|
||||
|
||||
TIM5: aliased Timer_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.TIM5);
|
||||
|
||||
TIM6: aliased Timer_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.TIM6);
|
||||
|
||||
TIM7: aliased Timer_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.TIM7);
|
||||
|
||||
TIM8: aliased Timer_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.TIM8);
|
||||
|
||||
TIM9: aliased Timer_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.TIM9);
|
||||
|
||||
TIM10: aliased Timer_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.TIM10);
|
||||
|
||||
TIM11: aliased Timer_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.TIM11);
|
||||
|
||||
TIM12: aliased Timer_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.TIM12);
|
||||
|
||||
TIM13: aliased Timer_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.TIM13);
|
||||
|
||||
TIM14: aliased Timer_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.TIM14);
|
||||
TIM1: aliased Timer_Registers with Volatile, Import, Address => Address_Map.TIM1;
|
||||
TIM2: aliased Timer_Registers with Volatile, Import, Address => Address_Map.TIM2;
|
||||
TIM3: aliased Timer_Registers with Volatile, Import, Address => Address_Map.TIM3;
|
||||
TIM4: aliased Timer_Registers with Volatile, Import, Address => Address_Map.TIM4;
|
||||
TIM5: aliased Timer_Registers with Volatile, Import, Address => Address_Map.TIM5;
|
||||
TIM6: aliased Timer_Registers with Volatile, Import, Address => Address_Map.TIM6;
|
||||
TIM7: aliased Timer_Registers with Volatile, Import, Address => Address_Map.TIM7;
|
||||
TIM8: aliased Timer_Registers with Volatile, Import, Address => Address_Map.TIM8;
|
||||
TIM9: aliased Timer_Registers with Volatile, Import, Address => Address_Map.TIM9;
|
||||
TIM10: aliased Timer_Registers with Volatile, Import, Address => Address_Map.TIM10;
|
||||
TIM11: aliased Timer_Registers with Volatile, Import, Address => Address_Map.TIM11;
|
||||
TIM12: aliased Timer_Registers with Volatile, Import, Address => Address_Map.TIM12;
|
||||
TIM13: aliased Timer_Registers with Volatile, Import, Address => Address_Map.TIM13;
|
||||
TIM14: aliased Timer_Registers with Volatile, Import, Address => Address_Map.TIM14;
|
||||
|
||||
-- In F469 TIM9,TIM12 no CR2
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
with System.Storage_Elements;
|
||||
with STM32.Address_Map;
|
||||
|
||||
-- Universal (Synchronous-)Asynchronous Receivers-Transmitters
|
||||
|
@ -256,35 +255,16 @@ package STM32.USARTs is
|
|||
GTPR at 16#18# range 0 .. 31;
|
||||
end record;
|
||||
|
||||
USART1: aliased USART_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.USART1);
|
||||
|
||||
USART2: aliased USART_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.USART2);
|
||||
|
||||
USART3: aliased USART_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.USART3);
|
||||
|
||||
UART4: aliased USART_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.UART4);
|
||||
|
||||
UART5: aliased USART_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.UART5);
|
||||
|
||||
USART6: aliased USART_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.USART6);
|
||||
|
||||
UART7: aliased USART_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.UART7);
|
||||
|
||||
UART8: aliased USART_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.UART8);
|
||||
|
||||
UART9: aliased USART_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.UART9);
|
||||
|
||||
UART10: aliased USART_Registers with Volatile, Import,
|
||||
Address => System.Storage_Elements.To_Address(Address_Map.UART10);
|
||||
USART1: aliased USART_Registers with Volatile, Import, Address => Address_Map.USART1;
|
||||
USART2: aliased USART_Registers with Volatile, Import, Address => Address_Map.USART2;
|
||||
USART3: aliased USART_Registers with Volatile, Import, Address => Address_Map.USART3;
|
||||
UART4: aliased USART_Registers with Volatile, Import, Address => Address_Map.UART4;
|
||||
UART5: aliased USART_Registers with Volatile, Import, Address => Address_Map.UART5;
|
||||
USART6: aliased USART_Registers with Volatile, Import, Address => Address_Map.USART6;
|
||||
UART7: aliased USART_Registers with Volatile, Import, Address => Address_Map.UART7;
|
||||
UART8: aliased USART_Registers with Volatile, Import, Address => Address_Map.UART8;
|
||||
UART9: aliased USART_Registers with Volatile, Import, Address => Address_Map.UART9;
|
||||
UART10: aliased USART_Registers with Volatile, Import, Address => Address_Map.UART10;
|
||||
|
||||
function Baud_Rate (
|
||||
Speed: Positive;
|
||||
|
|
Loading…
Reference in a new issue