Functions

Data transfers functions. More...

Collaboration diagram for Data transfers functions:

Functions

uint16_t USART_ReceiveData (USART_TypeDef *USARTx)
 Returns the most recent received data by the USARTx peripheral. More...
 
void USART_SendData (USART_TypeDef *USARTx, uint16_t Data)
 Transmits single data through the USARTx peripheral. More...
 
void USART_STOPModeCmd (USART_TypeDef *USARTx, FunctionalState NewState)
 Enables or disables the specified USART peripheral in STOP Mode. More...
 
void USART_StopModeWakeUpSourceConfig (USART_TypeDef *USARTx, uint32_t USART_WakeUpSource)
 Selects the USART WakeUp method form stop mode. More...
 

Detailed Description

Data transfers functions.

STOP Mode functions.

 ===============================================================================
                      ##### Data transfers functions #####
 ===============================================================================  
    [..]
    This subsection provides a set of functions allowing to manage the USART data 
    transfers.
    [..]
    During an USART reception, data shifts in least significant bit first through 
    the RX pin. In this mode, the USART_DR register consists of a buffer (RDR) 
    between the internal bus and the received shift register.
    [..]
    When a transmission is taking place, a write instruction to the USART_DR register 
    stores the data in the TDR register and which is copied in the shift register 
    at the end of the current transmission.
    [..]
    The read access of the USART_DR register can be done using the USART_ReceiveData()
    function and returns the RDR buffered value. Whereas a write access to the USART_DR 
    can be done using USART_SendData() function and stores the written data into 
    TDR buffer.
 ===============================================================================
                        ##### STOP Mode functions #####
 ===============================================================================
    [..] This subsection provides a set of functions allowing to manage 
         WakeUp from STOP mode.

    [..] The USART is able to WakeUp from Stop Mode if USART clock is set to HSI
         or LSI.
         
    [..] The WakeUp source is configured by calling USART_StopModeWakeUpSourceConfig()
         function.
         
    [..] After configuring the source of WakeUp and before entering in Stop Mode 
         USART_STOPModeCmd() function should be called to allow USART WakeUp.

Function Documentation

uint16_t USART_ReceiveData ( USART_TypeDef USARTx)

Returns the most recent received data by the USARTx peripheral.

Parameters
USARTxwhere x can be 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or UART peripheral.
Return values
Thereceived data.

Definition at line 573 of file stm32f4xx_usart.c.

void USART_SendData ( USART_TypeDef USARTx,
uint16_t  Data 
)

Transmits single data through the USARTx peripheral.

Parameters
USARTxwhere x can be 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or UART peripheral.
Datathe data to transmit.
Return values
None

Definition at line 557 of file stm32f4xx_usart.c.

void USART_STOPModeCmd ( USART_TypeDef USARTx,
FunctionalState  NewState 
)

Enables or disables the specified USART peripheral in STOP 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 USARTx peripheral state in stop mode. This parameter can be: ENABLE or DISABLE.
Note
This function has to be called when USART clock is set to HSI or LSE.
Return values
None

Definition at line 754 of file stm32f30x_usart.c.

void USART_StopModeWakeUpSourceConfig ( USART_TypeDef USARTx,
uint32_t  USART_WakeUpSource 
)

Selects the USART WakeUp method form stop 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 selected USART wakeup method. This parameter can be one of the following values:
  • USART_WakeUpSource_AddressMatch: WUF active on address match.
  • USART_WakeUpSource_StartBit: WUF active on Start bit detection.
  • USART_WakeUpSource_RXNE: WUF active on RXNE.
Note
This function has to be called before calling USART_Cmd() function.
Return values
None

Definition at line 787 of file stm32f30x_usart.c.



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