% sdram_test

This commit is contained in:
Vovanium 2024-03-28 19:51:49 +03:00
parent 9f57a6c53b
commit d34789c66a
1 changed files with 4 additions and 8 deletions

View File

@ -17,14 +17,10 @@ procedure SDRAM_Test is
M : Test_Type with Import, Address => Board.Memory.Memory_Base;
package LED is new GPIO_Port_Boolean (LED_Port, LED_Bit);
package LED_2 is new GPIO_Port_Boolean (LED_2_Port, LED_2_Bit);
procedure Expect (Index : Integer; X, Y : Unsigned_32) is
begin
LED.Set (not LED_On xor Y = X);
LED_2.Set (not LED_2_On xor Y /= X);
LED.Set (Y = X);
LED_2.Set (Y /= X);
if Y /= X then
UART.IO.Transmit ("Error @" & Integer'Image (Index)
@ -76,7 +72,7 @@ begin
LED.Set_OSPEEDR (STM32.GPIO.Very_High_Speed);
LED.Set_PUPDR (STM32.GPIO.No_Pull);
LED.Set (not LED_On);
LED.Set (False);
LED_2_RCC_EN := True;
@ -85,7 +81,7 @@ begin
LED_2.Set_OSPEEDR (STM32.GPIO.Very_High_Speed);
LED_2.Set_PUPDR (STM32.GPIO.No_Pull);
LED_2.Set (not LED_2_On);
LED_2.Set (False);
UART.IO.Transmit ("SDRAM Initialized" & ASCII.CR & ASCII.LF);