Functions

RS485 mode function. More...

Collaboration diagram for RS485 mode function:

Functions

void USART_DECmd (USART_TypeDef *USARTx, FunctionalState NewState)
 Enables or disables the USART's DE functionality. More...
 
void USART_DEPolarityConfig (USART_TypeDef *USARTx, uint32_t USART_DEPolarity)
 Configures the USART's DE polarity. More...
 
void USART_SetDEAssertionTime (USART_TypeDef *USARTx, uint32_t USART_DEAssertionTime)
 Sets the specified RS485 DE assertion time. More...
 
void USART_SetDEDeassertionTime (USART_TypeDef *USARTx, uint32_t USART_DEDeassertionTime)
 Sets the specified RS485 DE deassertion time. More...
 

Detailed Description

RS485 mode function.

 ===============================================================================
                        ##### RS485 mode functions #####
 ===============================================================================
    [..] This subsection provides a set of functions allowing to manage the USART
         RS485 flow control.
    [..] RS485 flow control (Driver enable feature) handling is possible through
         the following procedure:
         (#) Program the Baud rate, Word length = 8 bits, Stop bits, Parity, 
             Transmitter/Receiver modes and hardware flow control values using 
             the USART_Init() function.
         (#) Enable the Driver Enable using the USART_DECmd() function.
         (#) Configures the Driver Enable polarity using the USART_DEPolarityConfig()
             function.
         (#) Configures the Driver Enable assertion time using USART_SetDEAssertionTime() 
             function and deassertion time using the USART_SetDEDeassertionTime()
             function.    
         (#) Enable the USART using the USART_Cmd() function.
      [..]  
       (@) The assertion and dessertion times are expressed in sample time units (1/8 or 
            1/16 bit time, depending on the oversampling rate).

Function Documentation

void USART_DECmd ( USART_TypeDef USARTx,
FunctionalState  NewState 
)

Enables or disables the USART's DE functionality.

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 driver enable mode. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 1495 of file stm32f30x_usart.c.

void USART_DEPolarityConfig ( USART_TypeDef USARTx,
uint32_t  USART_DEPolarity 
)

Configures the USART's DE polarity.

Parameters
USARTxSelect the USART peripheral. This parameter can be one of the following values: USART1 or USART2 or USART3 or UART4 or UART5.
USART_DEPolarityspecifies the DE polarity. This parameter can be one of the following values:
  • USART_DEPolarity_Low
  • USART_DEPolarity_High
Return values
None

Definition at line 1522 of file stm32f30x_usart.c.

void USART_SetDEAssertionTime ( USART_TypeDef USARTx,
uint32_t  USART_DEAssertionTime 
)

Sets the specified RS485 DE assertion time.

Parameters
USARTxSelect the USART peripheral. This parameter can be one of the following values: USART1 or USART2 or USART3 or UART4 or UART5.
USART_AssertionTimespecifies the time between the activation of the DE signal and the beginning of the start bit
Return values
None

Definition at line 1540 of file stm32f30x_usart.c.

void USART_SetDEDeassertionTime ( USART_TypeDef USARTx,
uint32_t  USART_DEDeassertionTime 
)

Sets the specified RS485 DE deassertion time.

Parameters
USARTxSelect the USART peripheral. This parameter can be one of the following values: USART1 or USART2 or USART3 or UART4 or UART5.
USART_DeassertionTimespecifies the time between the middle of the last stop bit in a transmitted message and the de-activation of the DE signal
Return values
None

Definition at line 1560 of file stm32f30x_usart.c.



rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Wed Jul 3 2019 19:59:30