H753_CPP_AS6C4008_FMC_DaughterBoard_02
Loading...
Searching...
No Matches
sram_validation.h File Reference

External SRAM daughterboard validation test interface. More...

#include "stm32h7xx_hal.h"
#include <stdint.h>
Include dependency graph for sram_validation.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  sramValidationReport_t
 Detailed validation report kept in internal MCU RAM. More...
 

Macros

#define SRAM_VALIDATION_BASE_ADDR   ((uint32_t)0x60000000u)
 External SRAM base address on FMC Bank1 / NE1.
 
#define SRAM_VALIDATION_TOTAL_SIZE_BYTES   ((uint32_t)(512u * 1024u))
 Total external SRAM size in bytes for the AS6C4008 device.
 
#define SRAM_VALIDATION_SMALL_RANGE_SIZE   ((uint32_t)256u)
 Small-range test size in bytes.
 
#define SRAM_VALIDATION_PATTERN_TEST_SIZE   ((uint32_t)(8u * 1024u))
 Pattern-test size in bytes.
 
#define SRAM_VALIDATION_ALIAS_COUNT   ((uint32_t)19u)
 Number of alias probe offsets used by the alias test.
 

Enumerations

enum  sramValidationTestId_t {
  SRAM_VALIDATION_TEST_NONE = 0 , SRAM_VALIDATION_TEST_ALIAS_LINES , SRAM_VALIDATION_TEST_SMALL_RANGE , SRAM_VALIDATION_TEST_FULL_SWEEP ,
  SRAM_VALIDATION_TEST_PATTERN , SRAM_VALIDATION_TEST_FULL_RANGE_PATTERN
}
 Validation test identifiers. More...
 
enum  sramValidationPhase_t { SRAM_VALIDATION_PHASE_IDLE = 0 , SRAM_VALIDATION_PHASE_PREPARE , SRAM_VALIDATION_PHASE_FILL , SRAM_VALIDATION_PHASE_VERIFY }
 Validation phase identifiers. More...
 
enum  sramValidationStatus_t { SRAM_VALIDATION_STATUS_PASS = 0 , SRAM_VALIDATION_STATUS_FAIL }
 Overall validation status. More...
 

Functions

const sramValidationReport_tSramValidation_RunAll (void)
 Run the current SRAM validation tests and print results to stdout.
 
const sramValidationReport_tSramValidation_GetReport (void)
 Get the most recent SRAM validation report.
 
HAL_StatusTypeDef SramValidation_RunPatternTest (void)
 Run the SRAM pattern test over a small region.
 

Detailed Description

External SRAM daughterboard validation test interface.

Macro Definition Documentation

◆ SRAM_VALIDATION_ALIAS_COUNT

#define SRAM_VALIDATION_ALIAS_COUNT   ((uint32_t)19u)

Number of alias probe offsets used by the alias test.

◆ SRAM_VALIDATION_BASE_ADDR

#define SRAM_VALIDATION_BASE_ADDR   ((uint32_t)0x60000000u)

External SRAM base address on FMC Bank1 / NE1.

◆ SRAM_VALIDATION_PATTERN_TEST_SIZE

#define SRAM_VALIDATION_PATTERN_TEST_SIZE   ((uint32_t)(8u * 1024u))

Pattern-test size in bytes.

◆ SRAM_VALIDATION_SMALL_RANGE_SIZE

#define SRAM_VALIDATION_SMALL_RANGE_SIZE   ((uint32_t)256u)

Small-range test size in bytes.

◆ SRAM_VALIDATION_TOTAL_SIZE_BYTES

#define SRAM_VALIDATION_TOTAL_SIZE_BYTES   ((uint32_t)(512u * 1024u))

Total external SRAM size in bytes for the AS6C4008 device.

Enumeration Type Documentation

◆ sramValidationPhase_t

Validation phase identifiers.

Enumerator
SRAM_VALIDATION_PHASE_IDLE 
SRAM_VALIDATION_PHASE_PREPARE 
SRAM_VALIDATION_PHASE_FILL 
SRAM_VALIDATION_PHASE_VERIFY 

◆ sramValidationStatus_t

Overall validation status.

Enumerator
SRAM_VALIDATION_STATUS_PASS 
SRAM_VALIDATION_STATUS_FAIL 

◆ sramValidationTestId_t

Validation test identifiers.

Enumerator
SRAM_VALIDATION_TEST_NONE 
SRAM_VALIDATION_TEST_ALIAS_LINES 
SRAM_VALIDATION_TEST_SMALL_RANGE 
SRAM_VALIDATION_TEST_FULL_SWEEP 
SRAM_VALIDATION_TEST_PATTERN 
SRAM_VALIDATION_TEST_FULL_RANGE_PATTERN 

Function Documentation

◆ SramValidation_GetReport()

const sramValidationReport_t * SramValidation_GetReport ( void )

Get the most recent SRAM validation report.

Returns
Pointer to a persistent validation report structure.
Pointer to the persistent validation report structure.

◆ SramValidation_RunAll()

const sramValidationReport_t * SramValidation_RunAll ( void )

Run the current SRAM validation tests and print results to stdout.

Returns
Pointer to a persistent validation report structure.

◆ SramValidation_RunPatternTest()

HAL_StatusTypeDef SramValidation_RunPatternTest ( void )

Run the SRAM pattern test over a small region.

Returns
HAL_OK on success, HAL_ERROR on failure.