Functions

Half-duplex mode function. More...

Collaboration diagram for Halfduplex mode function:

Functions

void USART_AddressDetectionConfig (USART_TypeDef *USARTx, uint32_t USART_AddressLength)
 Configure the the USART Address detection length. More...
 
void USART_HalfDuplexCmd (USART_TypeDef *USARTx, FunctionalState NewState)
 Enables or disables the USART's Half Duplex communication. More...
 
void USART_MuteModeCmd (USART_TypeDef *USARTx, FunctionalState NewState)
 Enables or disables the USART's mute mode. More...
 
void USART_MuteModeWakeUpConfig (USART_TypeDef *USARTx, uint32_t USART_WakeUp)
 Selects the USART WakeUp method from mute mode. More...
 
void USART_SetAddress (USART_TypeDef *USARTx, uint8_t USART_Address)
 Sets the address of the USART node. More...
 

Detailed Description

Half-duplex mode function.

Multi-Processor Communication functions.

 ===============================================================================
                    ##### Half-duplex mode function #####
 ===============================================================================  
    [..]
    This subsection provides a set of functions allowing to manage the USART 
    Half-duplex communication.
    [..]
    The USART can be configured to follow a single-wire half-duplex protocol where 
    the TX and RX lines are internally connected.
    [..]
    USART Half duplex communication is possible through the following procedure:
      (#) Program the Baud rate, Word length, Stop bits, Parity, Mode transmitter 
          or Mode receiver and hardware flow control values using the USART_Init()
          function.
      (#) Configures the USART address using the USART_SetAddress() function.
      (#) Enable the USART using the USART_Cmd() function.
      (#) Enable the half duplex mode using USART_HalfDuplexCmd() function.


    -@- The RX pin is no longer used
    -@- In Half-duplex mode the following bits must be kept cleared:
      (+@) LINEN and CLKEN bits in the USART_CR2 register.
      (+@) SCEN and IREN bits in the USART_CR3 register.
 ===============================================================================
             ##### Multi-Processor Communication functions #####
 ===============================================================================
    [..] This subsection provides a set of functions allowing to manage the USART
         multiprocessor communication.
    [..] For instance one of the USARTs can be the master, its TX output is
         connected to the RX input of the other USART. The others are slaves,
         their respective TX outputs are logically ANDed together and connected 
         to the RX input of the master. USART multiprocessor communication is 
         possible through the following procedure:
         (#) Program the Baud rate, Word length = 9 bits, Stop bits, Parity, 
             Mode transmitter or Mode receiver and hardware flow control values 
             using the USART_Init() function.
         (#) Configures the USART address using the USART_SetAddress() function.
         (#) Configures the wake up methode (USART_WakeUp_IdleLine or 
             USART_WakeUp_AddressMark) using USART_WakeUpConfig() function only 
             for the slaves.
         (#) Enable the USART using the USART_Cmd() function.
         (#) Enter the USART slaves in mute mode using USART_ReceiverWakeUpCmd() 
             function.
    [..] The USART Slave exit from mute mode when receive the wake up condition.

Function Documentation

void USART_AddressDetectionConfig ( USART_TypeDef USARTx,
uint32_t  USART_AddressLength 
)

Configure the the USART Address detection length.

Parameters
USARTxSelect the USART peripheral. This parameter can be one of the following values: USART1 or USART2 or USART3 or UART4 or UART5.
USART_AddressLengthspecifies the USART address length detection. This parameter can be one of the following values:
  • USART_AddressLength_4b: 4-bit address length detection
  • USART_AddressLength_7b: 7-bit address length detection
Return values
None

Definition at line 1048 of file stm32f30x_usart.c.

void USART_HalfDuplexCmd ( USART_TypeDef USARTx,
FunctionalState  NewState 
)

Enables or disables the USART's Half Duplex communication.

Parameters
USARTxwhere x can be 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or UART peripheral.
NewStatenew state of the USART Communication. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 836 of file stm32f4xx_usart.c.

void USART_MuteModeCmd ( USART_TypeDef USARTx,
FunctionalState  NewState 
)

Enables or disables the USART's mute mode.

Parameters
USARTxSelect the USART peripheral. This parameter can be one of the following values: USART1 or USART2 or USART3 or UART4 or UART5.
NewStatenew state of the USART mute mode. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 1000 of file stm32f30x_usart.c.

void USART_MuteModeWakeUpConfig ( USART_TypeDef USARTx,
uint32_t  USART_WakeUp 
)

Selects the USART WakeUp method from mute mode.

Parameters
USARTxSelect the USART peripheral. This parameter can be one of the following values: USART1 or USART2 or USART3 or UART4 or UART5.
USART_WakeUpspecifies the USART wakeup method. This parameter can be one of the following values:
  • USART_WakeUp_IdleLine: WakeUp by an idle line detection
  • USART_WakeUp_AddressMark: WakeUp by an address mark
Return values
None

Definition at line 1028 of file stm32f30x_usart.c.

void USART_SetAddress ( USART_TypeDef USARTx,
uint8_t  USART_Address 
)

Sets the address of the USART node.

Parameters
USARTxSelect the USART peripheral. This parameter can be one of the following values: USART1 or USART2 or USART3 or UART4 or UART5.
USART_AddressIndicates the address of the USART node.
Return values
None

Definition at line 981 of file stm32f30x_usart.c.



rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Thu Apr 15 2021 05:07:56