CMSIS-Driver Validation  
Driver Validation
Data Exchange

Functions

void USART_Mode_Asynchronous (void)
 Function: Function USART_Mode_Asynchronous. More...
 
void USART_Mode_Synchronous_Master (void)
 Function: Function USART_Mode_Synchronous_Master. More...
 
void USART_Mode_Synchronous_Slave (void)
 Function: Function USART_Mode_Synchronous_Slave. More...
 
void USART_Mode_Single_Wire (void)
 Function: Function USART_Mode_Single_Wire. More...
 
void USART_Mode_IrDA (void)
 Function: Function USART_Mode_IrDA. More...
 
void USART_Data_Bits_5 (void)
 Function: Function USART_Data_Bits_5. More...
 
void USART_Data_Bits_6 (void)
 Function: Function USART_Data_Bits_6. More...
 
void USART_Data_Bits_7 (void)
 Function: Function USART_Data_Bits_7. More...
 
void USART_Data_Bits_8 (void)
 Function: Function USART_Data_Bits_8. More...
 
void USART_Data_Bits_9 (void)
 Function: Function USART_Data_Bits_9. More...
 
void USART_Parity_None (void)
 Function: Function USART_Parity_None. More...
 
void USART_Parity_Even (void)
 Function: Function USART_Parity_Even. More...
 
void USART_Parity_Odd (void)
 Function: Function USART_Parity_Odd. More...
 
void USART_Stop_Bits_1 (void)
 Function: Function USART_Stop_Bits_1. More...
 
void USART_Stop_Bits_2 (void)
 Function: Function USART_Stop_Bits_2. More...
 
void USART_Stop_Bits_1_5 (void)
 Function: Function USART_Stop_Bits_1_5. More...
 
void USART_Stop_Bits_0_5 (void)
 Function: Function USART_Stop_Bits_0_5. More...
 
void USART_Flow_Control_None (void)
 Function: Function USART_Flow_Control_None. More...
 
void USART_Flow_Control_RTS (void)
 Function: Function USART_Flow_Control_RTS. More...
 
void USART_Flow_Control_CTS (void)
 Function: Function USART_Flow_Control_CTS. More...
 
void USART_Flow_Control_RTS_CTS (void)
 Function: Function USART_Flow_Control_RTS_CTS. More...
 
void USART_Clock_Pol0_Pha0 (void)
 Function: Function USART_Clock_Pol0_Pha0. More...
 
void USART_Clock_Pol0_Pha1 (void)
 Function: Function USART_Clock_Pol0_Pha1. More...
 
void USART_Clock_Pol1_Pha0 (void)
 Function: Function USART_Clock_Pol1_Pha0. More...
 
void USART_Clock_Pol1_Pha1 (void)
 Function: Function USART_Clock_Pol1_Pha1. More...
 
void USART_Baudrate_Min (void)
 Function: Function USART_Baudrate_Min. More...
 
void USART_Baudrate_Max (void)
 Function: Function USART_Baudrate_Max. More...
 
void USART_Number_Of_Items (void)
 Function: Function USART_Number_Of_Items. More...
 
void USART_GetTxCount (void)
 Function: Function USART_GetTxCount. More...
 
void USART_GetRxCount (void)
 Function: Function USART_GetRxCount. More...
 
void USART_GetTxRxCount (void)
 Function: Function USART_GetTxRxCount. More...
 
void USART_AbortSend (void)
 Function: Function USART_AbortSend. More...
 
void USART_AbortReceive (void)
 Function: Function USART_AbortReceive. More...
 
void USART_AbortTransfer (void)
 Function: Function USART_AbortTransfer. More...
 
void USART_TxBreak (void)
 Function: Function USART_TxBreak. More...
 

Description

These tests verify API and operation of the USART data exchange functions.

The data exchange tests verify the following driver functions (USART Driver function documentation):

All of these tests execute a data exchange and check the result of this data exchange.

Data exchange test procedure when Test Mode USART Server is selected:

Data exchange Abort test procedure when Test Mode USART Server is selected:

Data exchange test procedure when Test Mode Loopback is selected:

Note
Limitations of Data Exchange tests if Test Mode Loopback is selected:
  • in synchronous mode only Master mode transfer can be tested
  • only 8 data bit tests are supported
  • parity tests are not supported
  • stop bits tests are not supported
  • flow control tests are not supported
  • clock polarity and clock phase tests are not supported

Function Documentation

◆ USART_Mode_Asynchronous()

void USART_Mode_Asynchronous ( void  )

The function USART_Mode_Asynchronous verifies data exchange:

  • in Asynchronous mode
  • with default data bits
  • with default parity
  • with default stop bits
  • with default flow control
  • at default baudrate
  • for default number of data items

◆ USART_Mode_Synchronous_Master()

void USART_Mode_Synchronous_Master ( void  )

The function USART_Mode_Synchronous_Master verifies data exchange:

  • in Synchronous Master mode
  • with default data bits
  • with no parity
  • with 1 stop bit
  • with no flow control
  • with default clock polarity
  • with default clock phase
  • at default baudrate
  • for default number of data items
Note
In Test Mode Loopback Receive function is not tested

◆ USART_Mode_Synchronous_Slave()

void USART_Mode_Synchronous_Slave ( void  )

The function USART_Mode_Synchronous_Slave verifies data exchange:

  • in Synchronous Slave mode
  • with default data bits
  • with no parity
  • with 1 stop bit
  • with no flow control
  • with default clock polarity
  • with default clock phase
  • at default baudrate
  • for default number of data items
Note
In Test Mode Loopback this test is not executed

◆ USART_Mode_Single_Wire()

void USART_Mode_Single_Wire ( void  )

The function USART_Mode_Single_Wire verifies data exchange:

  • in Single-Wire mode
  • with default data bits
  • with default parity
  • with default stop bits
  • with no flow control
  • at default baudrate
  • for default number of data items
Note
In Test Mode Loopback this test is not executed

◆ USART_Mode_IrDA()

void USART_Mode_IrDA ( void  )

The function USART_Mode_IrDA verifies data exchange:

  • in Infra-red Data mode
  • with default data bits
  • with default parity
  • with default stop bits
  • with default flow control
  • at default baudrate
  • for default number of data items
Note
In Test Mode Loopback this test is not executed

◆ USART_Data_Bits_5()

void USART_Data_Bits_5 ( void  )

The function USART_Data_Bits_5 verifies data exchange:

  • in default mode
  • with 5 data bits
  • with default parity
  • with default stop bits
  • with default flow control
  • with default clock polarity
  • with default clock phase
  • at default baudrate
  • for default number of data items
Note
In Test Mode Loopback this test is not executed

◆ USART_Data_Bits_6()

void USART_Data_Bits_6 ( void  )

The function USART_Data_Bits_6 verifies data exchange:

  • in default mode
  • with 6 data bits
  • with default parity
  • with default stop bits
  • with default flow control
  • with default clock polarity
  • with default clock phase
  • at default baudrate
  • for default number of data items
Note
In Test Mode Loopback this test is not executed

◆ USART_Data_Bits_7()

void USART_Data_Bits_7 ( void  )

The function USART_Data_Bits_7 verifies data exchange:

  • in default mode
  • with 7 data bits
  • with default parity
  • with default stop bits
  • with default flow control
  • with default clock polarity
  • with default clock phase
  • at default baudrate
  • for default number of data items
Note
In Test Mode Loopback this test is not executed

◆ USART_Data_Bits_8()

void USART_Data_Bits_8 ( void  )

The function USART_Data_Bits_8 verifies data exchange:

  • in default mode
  • with 8 data bits
  • with default parity
  • with default stop bits
  • with default flow control
  • with default clock polarity
  • with default clock phase
  • at default baudrate
  • for default number of data items

◆ USART_Data_Bits_9()

void USART_Data_Bits_9 ( void  )

The function USART_Data_Bits_9 verifies data exchange:

  • in default mode
  • with 9 data bits
  • with default parity
  • with default stop bits
  • with default flow control
  • with default clock polarity
  • with default clock phase
  • at default baudrate
  • for default number of data items
Note
In Test Mode Loopback this test is not executed

◆ USART_Parity_None()

void USART_Parity_None ( void  )

The function USART_Parity_None verifies data exchange:

  • in default mode
  • with default data bits
  • with no parity
  • with default stop bits
  • with default flow control
  • with default clock polarity
  • with default clock phase
  • at default baudrate
  • for default number of data items

◆ USART_Parity_Even()

void USART_Parity_Even ( void  )

The function USART_Parity_Even verifies data exchange:

  • in default mode
  • with default data bits
  • with even parity
  • with default stop bits
  • with default flow control
  • at default baudrate
  • for default number of data items
Note
This test is not executed if any of the following settings are selected:
  • Test Mode Loopback
  • Tests Default Mode Synchronous Master/Slave

◆ USART_Parity_Odd()

void USART_Parity_Odd ( void  )

The function USART_Parity_Odd verifies data exchange:

  • in default mode
  • with default data bits
  • with odd parity
  • with default stop bits
  • with default flow control
  • at default baudrate
  • for default number of data items
Note
This test is not executed if any of the following settings are selected:
  • Test Mode Loopback
  • Tests Default Mode Synchronous Master/Slave

◆ USART_Stop_Bits_1()

void USART_Stop_Bits_1 ( void  )

The function USART_Stop_Bits_1 verifies data exchange:

  • in default mode
  • with default data bits
  • with default parity
  • with 1 stop bit
  • with default flow control
  • with default clock polarity
  • with default clock phase
  • at default baudrate
  • for default number of data items

◆ USART_Stop_Bits_2()

void USART_Stop_Bits_2 ( void  )

The function USART_Stop_Bits_2 verifies data exchange:

  • in default mode
  • with default data bits
  • with default parity
  • with 2 stop bits
  • with default flow control
  • at default baudrate
  • for default number of data items
Note
This test is not executed if any of the following settings are selected:
  • Test Mode Loopback
  • Tests Default Mode Synchronous Master/Slave

◆ USART_Stop_Bits_1_5()

void USART_Stop_Bits_1_5 ( void  )

The function USART_Stop_Bits_1_5 verifies data exchange:

  • in default mode
  • with default data bits
  • with default parity
  • with 1.5 stop bits
  • with default flow control
  • at default baudrate
  • for default number of data items
Note
This test is not executed if any of the following settings are selected:
  • Test Mode Loopback
  • Tests Default Mode Synchronous Master/Slave

◆ USART_Stop_Bits_0_5()

void USART_Stop_Bits_0_5 ( void  )

The function USART_Stop_Bits_0_5 verifies data exchange:

  • in default mode
  • with default data bits
  • with default parity
  • with 0.5 stop bits
  • with default flow control
  • at default baudrate
  • for default number of data items
Note
This test is not executed if any of the following settings are selected:
  • Test Mode Loopback
  • Tests Default Mode Synchronous Master/Slave

◆ USART_Flow_Control_None()

void USART_Flow_Control_None ( void  )

The function USART_Flow_Control_None verifies data exchange:

  • in default mode
  • with default data bits
  • with default parity
  • with default stop bits
  • with no flow control
  • with default clock polarity
  • with default clock phase
  • at default baudrate
  • for default number of data items

◆ USART_Flow_Control_RTS()

void USART_Flow_Control_RTS ( void  )

The function USART_Flow_Control_RTS verifies functionality of the RTS line flow control by trying to receive half of default number of data items, after that, RTS line should be deactivated by the USART Client hardware and USART Server should stop sending further data.

The RTS line flow control functionality is tested with following settings:

  • in default mode
  • with default data bits
  • with default parity
  • with default stop bits
  • with flow control using RTS signal
  • at default baudrate

Test procedure consists of the following steps:

  • start reception of half of default number of items
  • after half of default number of items was received the RTS line should go to inactive state
  • USART Server after seeing that its CTS line (USART Clients RTS line) went to inactive state should stop sending further data
  • after timeout read from USART Server the number of items it has sent and assert that it is less than default number of items
Note
This test is not executed if any of the following settings are selected:
  • Test Mode Loopback
  • Tests Default Mode Synchronous Master/Slave or Single-wire

◆ USART_Flow_Control_CTS()

void USART_Flow_Control_CTS ( void  )

The function USART_Flow_Control_CTS verifies functionality of the CTS line flow control by trying to send default number of data items, while at half of transmitted number of items the USART Server deactivates its RTS line (it is connected to CTS line on the USART Client).

The CTS line flow control functionality is tested with following settings:

  • in default mode
  • with default data bits
  • with default parity
  • with default stop bits
  • with flow control using CTS signal
  • at default baudrate

Test procedure consists of the following steps:

  • start send of default number of items
  • after USART Server receives half of default number of items it will drive its RTS line (USART Clients CTS line) inactive
  • before timeout check that tx_busy is active and that number of transmitted items is less than default number of items
Note
This test is not executed if any of the following settings are selected:
  • Test Mode Loopback
  • Tests Default Mode Synchronous Master/Slave or Single-wire

◆ USART_Flow_Control_RTS_CTS()

void USART_Flow_Control_RTS_CTS ( void  )

The function USART_Flow_Control_RTS_CTS verifies functionality of RTS And CTS lines. It calls function USART_Flow_Control_RTS that checks RTS line functionality, and USART_Flow_Control_CTS that checks CTS line functionality.

Note
This test is not executed if any of the following settings are selected:
  • Test Mode Loopback
  • Tests Default Mode Synchronous Master/Slave or Single-wire

◆ USART_Clock_Pol0_Pha0()

void USART_Clock_Pol0_Pha0 ( void  )

The function USART_Clock_Pol0_Pha0 verifies data exchange:

  • in default mode
  • with default data bits
  • with no parity
  • with 1 stop bit
  • with no flow control
  • with clock polarity 0
  • with clock phase 0
  • at default baudrate
  • for default number of data items
Note
This test is not executed if any of the following settings are selected:
  • Test Mode Loopback
  • Tests Default Mode Asynchronous/Single-wire/IrDA

◆ USART_Clock_Pol0_Pha1()

void USART_Clock_Pol0_Pha1 ( void  )

The function USART_Clock_Pol0_Pha1 verifies data exchange:

  • in default mode
  • with default data bits
  • with no parity
  • with 1 stop bit
  • with no flow control
  • with clock polarity 0
  • with clock phase 1
  • at default baudrate
  • for default number of data items
Note
This test is not executed if any of the following settings are selected:
  • Test Mode Loopback
  • Tests Default Mode Asynchronous/Single-wire/IrDA

◆ USART_Clock_Pol1_Pha0()

void USART_Clock_Pol1_Pha0 ( void  )

The function USART_Clock_Pol1_Pha0 verifies data exchange:

  • in default mode
  • with default data bits
  • with no parity
  • with 1 stop bit
  • with no flow control
  • with clock polarity 1
  • with clock phase 0
  • at default baudrate
  • for default number of data items
Note
This test is not executed if any of the following settings are selected:
  • Test Mode Loopback
  • Tests Default Mode Asynchronous/Single-wire/IrDA

◆ USART_Clock_Pol1_Pha1()

void USART_Clock_Pol1_Pha1 ( void  )

The function USART_Clock_Pol1_Pha1 verifies data exchange:

  • in default mode
  • with default data bits
  • with no parity
  • with 1 stop bit
  • with no flow control
  • with clock polarity 1
  • with clock phase 1
  • at default baudrate
  • for default number of data items
Note
This test is not executed if any of the following settings are selected:
  • Test Mode Loopback
  • Tests Default Mode Asynchronous/Single-wire/IrDA

◆ USART_Baudrate_Min()

void USART_Baudrate_Min ( void  )

The function USART_Baudrate_Min verifies data exchange:

  • in default mode
  • with default data bits
  • with default parity
  • with default stop bits
  • with default flow control
  • with default clock polarity
  • with default clock phase
  • at minimum baudrate (define USART_CFG_MIN_BAUDRATE in DV_USART_Config.h)
  • for default number of data items

This test function checks the following requirement:

  • measured bus speed for Send operation in Test Mode USART Server or Send/Receive operation in Test Mode Loopback is not 25% lower, or higher than requested

◆ USART_Baudrate_Max()

void USART_Baudrate_Max ( void  )

The function USART_Baudrate_Max verifies data exchange:

  • in default mode
  • with default data bits
  • with default parity
  • with default stop bits
  • with default flow control
  • with default clock polarity
  • with default clock phase
  • at maximum baudrate (define USART_CFG_MAX_BAUDRATE in DV_USART_Config.h)
  • for default number of data items

This test function checks the following requirement:

  • measured bus speed for Send operation in Test Mode USART Server or Send/Receive operation in Test Mode Loopback is not 25% lower, or higher than requested

◆ USART_Number_Of_Items()

void USART_Number_Of_Items ( void  )

The function USART_Number_Of_Items verifies data exchange:

  • in default mode
  • with default data bits
  • with default parity
  • with default stop bits
  • with default flow control
  • with default clock polarity
  • with default clock phase
  • at default baudrate
  • for different number of items (defines USART_CFG_NUM1 .. USART_CFG_NUM5 in DV_USART_Config.h)

◆ USART_GetTxCount()

void USART_GetTxCount ( void  )

The function USART_GetTxCount verifies GetTxCount function (count changing) during data exchange (Send):

  • in default mode
  • with default data bits
  • with default parity
  • with default stop bits
  • with default flow control
  • with default clock polarity
  • with default clock phase
  • at default baudrate

◆ USART_GetRxCount()

void USART_GetRxCount ( void  )

The function USART_GetRxCount verifies GetRxCount function (count changing) during data exchange (Receive):

  • in default mode
  • with default data bits
  • with default parity
  • with default stop bits
  • with default flow control
  • with default clock polarity
  • with default clock phase
  • at default baudrate

◆ USART_GetTxRxCount()

void USART_GetTxRxCount ( void  )

The function USART_GetTxRxCount verifies GetTxCount and GetRxCount functions (count changing) during data exchange (Transfer):

  • in default mode
  • with default data bits
  • with no parity
  • with 1 stop bits
  • with no flow control
  • with default clock polarity
  • with default clock phase
  • at default baudrate
Note
If Tests Default Mode Asynchronous/Single-wire/IrDA is selected this test is not executed

◆ USART_AbortSend()

void USART_AbortSend ( void  )

The function USART_AbortSend verifies Abort function abort of data exchange (Send):

  • in default mode
  • with default data bits
  • with default parity
  • with default stop bits
  • with default flow control
  • at default baudrate

◆ USART_AbortReceive()

void USART_AbortReceive ( void  )

The function USART_AbortReceive verifies Abort function abort of data exchange (Receive):

  • in default mode
  • with default data bits
  • with default parity
  • with default stop bits
  • with default flow control
  • with default clock polarity
  • with default clock phase
  • at default baudrate

◆ USART_AbortTransfer()

void USART_AbortTransfer ( void  )

The function USART_AbortTransfer verifies Abort function abort of data exchange (Transfer):

  • in default mode
  • with default data bits
  • with no parity
  • with 1 stop bit
  • with no flow control
  • with default clock polarity
  • with default clock phase
  • at default baudrate
Note
If Tests Default Mode Asynchronous/Single-wire/IrDA is selected this test is not executed

◆ USART_TxBreak()

void USART_TxBreak ( void  )

The function USART_TxBreak verifies Break signaling:

  • in default mode
  • with default data bits
  • with default parity
  • with default stop bits
  • with no flow control
  • at default baudrate
Note
This test is not executed if any of the following settings are selected:
  • Test Mode Loopback
  • Tests Default Mode Synchronous Master/Slave