CMSIS-Driver Validation  Version 1.0
Driver Validation
 All Files Functions Variables Typedefs Macros Groups Pages
USART Validation

USART test cases. More...

Functions

void USART_GetCapabilities (void)
 Test case: USART_GetCapabilities.
 
void USART_Initialization (void)
 Test case: USART_Initialization.
 
void USART_CheckInvalidInit (void)
 Test case: USART_CheckInvalidInit.
 
void USART_PowerControl (void)
 Test case: USART_PowerControl.
 
void USART_Config_PolarityPhase (void)
 Test case: USART_Config_PolarityPhase.
 
void USART_Config_DataBits (void)
 Test case: USART_Config_DataBits.
 
void USART_Config_StopBits (void)
 Test case: USART_Config_StopBits.
 
void USART_Config_Parity (void)
 Test case: USART_Config_Parity.
 
void USART_Config_Baudrate (void)
 Test case: USART_Config_Baudrate.
 
void USART_Loopback_CheckBaudrate (void)
 Test case: USART_Loopback_CheckBaudrate.
 
void USART_Config_CommonParams (void)
 Test case: USART_Config_CommonParams.
 
void USART_Send (void)
 Test case: USART_Send.
 
void USART_AsynchronousReceive (void)
 Test case: USART_AsynchronousReceive.
 
void USART_Loopback_Transfer (void)
 Test case: USART_Loopback_Transfer.
 

Description

The USART validation test performs the following checks:

Loopback Communication Setup

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

Function Documentation

void USART_AsynchronousReceive ( void  )

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

  • Initialize with callback
  • Power on
  • Send data using callback
  • Send data without callback
  • Power off
  • Uninitialize
void USART_CheckInvalidInit ( void  )

The test case USART_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 USART_Config_Baudrate ( void  )

The test case USART_Config_Baudrate verifies the Control function and configures various baudrates with the sequence:

  • Initialize with callback
  • Power on
  • Change bus speed
  • Power off
  • Uninitialize
Note
This test needs to pass to be able to transfer data via the USART correctly. Usually, USART communication is set to a certain baudrate with a defined tolerance. If the driver is not able to set the baudrate correctly, data exchange will not be possible.
void USART_Config_CommonParams ( void  )

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

  • Initialize with callback
  • Power on
  • Configure USART bus
  • Set transmitter
  • Set receiver
  • Power off
  • Uninitialize
void USART_Config_DataBits ( void  )

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

  • Initialize with callback
  • Power on
  • Data bits = 5
  • Data bits = 6
  • Data bits = 7
  • Data bits = 8
  • Data bits = 9
  • Power off
  • Uninitialize
void USART_Config_Parity ( void  )

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

  • Initialize with callback
  • Power on
  • Sets parity bits: even parity
  • Sets parity bits: no parity
  • Sets parity bits: odd parity
  • Power off
  • Uninitialize
void USART_Config_PolarityPhase ( void  )

The test case USART_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 USART_Config_StopBits ( void  )

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

  • Initialize with callback
  • Power on
  • Stop bits = 1
  • Stop bits = 2
  • Stop bits = 1.5
  • Stop bits = 0.5
  • Power off
  • Uninitialize
void USART_GetCapabilities ( void  )

The test case USART_GetCapabilities verifies the function GetCapabilities.

void USART_Initialization ( void  )

The test case USART_Initialization verifies the USART functions with the sequence:

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

The test case USART_Loopback_CheckBaudrate verifies the Control function, configures various baudrates, and measures the transfer time with this sequence:

  • Initialize with callback
  • Power on
  • Change baud rate 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 USART_Loopback_Transfer ( void  )

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

  • Initialize with callback
  • Power on
  • Clear input buffer
  • Transfer data
  • Check received data against sent data
  • Power off
  • Uninitialize
void USART_PowerControl ( void  )

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

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

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

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