CMSIS-Driver Validation  Version 1.3.0
Driver Validation
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
SPI Validation

SPI test cases. More...

Functions

void SPI_GetCapabilities (void)
 Test case: SPI_GetCapabilities. More...
 
void SPI_Initialization (void)
 Test case: SPI_Initialization. More...
 
void SPI_CheckInvalidInit (void)
 Test case: SPI_CheckInvalidInit. More...
 
void SPI_PowerControl (void)
 Test case: SPI_PowerControl. More...
 
void SPI_Config_PolarityPhase (void)
 Test case: SPI_Config_PolarityPhase. More...
 
void SPI_Config_DataBits (void)
 Test case: SPI_Config_DataBits. More...
 
void SPI_Config_BitOrder (void)
 Test case: SPI_Config_BitOrder. More...
 
void SPI_Config_SSMode (void)
 Test case: SPI_Config_SSMode. More...
 
void SPI_Config_CommonParams (void)
 Test case: SPI_Config_CommonParams. More...
 
void SPI_Config_BusSpeed (void)
 Test case: SPI_Config_BusSpeed. More...
 
void SPI_Send (void)
 Test case: SPI_Send. More...
 
void SPI_Receive (void)
 Test case: SPI_Receive. More...
 
void SPI_Loopback_CheckBusSpeed (void)
 Test case: SPI_Loopback_CheckBusSpeed. More...
 
void SPI_Loopback_Transfer (void)
 Test case: SPI_Loopback_Transfer. More...
 

Description

The SPI validation test performs the following checks:

Loopback Communication Setup

To perform loopback communication tests, it is required to connect the SPI's MISO signal to the MOSI signal (refer to the schematics of your target hardware for detailed pinout information).

Function Documentation

void SPI_CheckInvalidInit ( void  )

The test case SPI_CheckInvalidInit verifies the driver behaviour when receiving an invalid initialization sequence:

  • Uninitialize
  • PowerControl with Power off
  • PowerControl with Power on
  • Control
  • PowerControl with Power off
  • Uninitialize
void SPI_Config_BitOrder ( void  )

The test case SPI_Config_BitOrder verifies the Control function with the sequence:

  • Initialize with callback
  • Power on
  • Bit order LSB_MSB
  • Bit order MSB_LSB
  • Power off
  • Uninitialize
void SPI_Config_BusSpeed ( void  )

The test case SPI_Config_BusSpeed verifies the Control function and tests bus speeds with the sequence:

  • Initialize with callback
  • Power on
  • Change bus speed with specific control parameter
  • Read bus speed
  • Change bus speed with general control parameter
  • Read bus speed
  • Power off
  • Uninitialize
Note
Typically, the SPI bus speed is limited to a maximum number. This means that for a bus speed of 25 MHz, values below 25 MHz are also acceptable. If this test returns a higher value than the one that is being set, you need to check the driver.
void SPI_Config_CommonParams ( void  )

The test case SPI_Config_CommonParams verifies the Control function with the sequence:

  • Initialize with callback
  • Power on
  • Configure SPI bus
  • Power off
  • Uninitialize
void SPI_Config_DataBits ( void  )

The test case SPI_Config_DataBits verifies the Control function with the sequence:

  • Initialize with callback
  • Power on
  • Data bits = 8
  • Data bits = 16
  • Power off
  • Uninitialize
void SPI_Config_PolarityPhase ( void  )

The test case SPI_Config_PolarityPhase verifies the Control function with the sequence:

  • Initialize with callback
  • Power on
  • Set basic SPI bus configuration
  • Change polarity
  • Change phase
  • Change polarity and phase
  • Power off
  • Uninitialize
void SPI_Config_SSMode ( void  )

The test case SPI_Config_SSMode verifies the Control function with the sequence:

  • Initialize with callback
  • Power on
  • SS Mode MASTER_HW_OUTPUT
  • SS Mode MASTER_HW_INPUT
  • SS Mode MASTER_SW
  • Power off
  • Uninitialize
void SPI_GetCapabilities ( void  )

The test case SPI_GetCapabilities verifies the function GetCapabilities.

void SPI_Initialization ( void  )

The test case SPI_Initialization verifies the SPI functions with the sequence:

  • Initialize without callback
  • Uninitialize
  • Initialize with callback
  • Uninitialize
void SPI_Loopback_CheckBusSpeed ( void  )

The test case SPI_Loopback_CheckBusSpeed verifies the Control function, configures various bus speeds, and measures the transfer time with this sequence:

  • Initialize with callback
  • Power on
  • Change bus speed with specific control parameter
  • Measure transfer time
  • Power off
  • Uninitialize
Note
If this test issues errors or warnings, refer to the Reading Test Results section for more information.
void SPI_Loopback_Transfer ( void  )

The test case SPI_Loopback_Transfer verifies the function Transfer with the sequence:

  • Initialize with callback
  • Power on
  • Transfer data
  • Check received data against sent data
  • Power off
  • Uninitialize
void SPI_PowerControl ( void  )

The test case SPI_PowerControl verifies the PowerControl function with the sequence:

  • Initialize with callback
  • Power on
  • Power low
  • Power off
  • Uninitialize
void SPI_Receive ( void  )

The test case SPI_Receive verifies the function Receive with the sequence:

  • Initialize with callback
  • Power on
  • Receive using callback
  • Receive without callback
  • Power off
  • Uninitialize
void SPI_Send ( void  )

The test case SPI_Send verifies the function Send with the sequence:

  • Initialize with callback
  • Power on
  • Send using callback
  • Send without callback
  • Power off
  • Uninitialize