Multi-Processor Communication functions.
More...
Multi-Processor Communication functions.
AutoBaudRate functions.
===============================================================================
##### 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 method (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.
===============================================================================
##### AutoBaudRate functions #####
===============================================================================
[..] This subsection provides a set of functions allowing to manage
the AutoBaudRate detections.
[..] Before Enabling AutoBaudRate detection using USART_AutoBaudRateCmd ()
The character patterns used to calculate baudrate must be chosen by calling
USART_AutoBaudRateConfig() function. These function take as parameter :
(#)USART_AutoBaudRate_StartBit : any character starting with a bit 1.
(#)USART_AutoBaudRate_FallingEdge : any character starting with a 10xx bit pattern.
[..] At any later time, another request for AutoBaudRate detection can be performed
using USART_RequestCmd() function.
[..] The AutoBaudRate detection is monitored by the status of ABRF flag which indicate
that the AutoBaudRate detection is completed. In addition to ABRF flag, the ABRE flag
indicate that this procedure is completed without success. USART_GetFlagStatus ()
function should be used to monitor the status of these flags.
Enables or disables the Auto Baud Rate.
- Parameters
-
USARTx | Select the USART peripheral. This parameter can be one of the following values: USART1 or USART2 or USART3 or UART4 or UART5. |
NewState | new state of the USARTx auto baud rate. This parameter can be: ENABLE or DISABLE. |
- Return values
-
Definition at line 838 of file stm32f30x_usart.c.
void USART_AutoBaudRateConfig |
( |
USART_TypeDef * |
USARTx, |
|
|
uint32_t |
USART_AutoBaudRate |
|
) |
| |
Selects the USART auto baud rate method.
- Parameters
-
USARTx | Select the USART peripheral. This parameter can be one of the following values: USART1 or USART2 or USART3 or UART4 or UART5. |
USART_AutoBaudRate | specifies the selected USART auto baud rate method. This parameter can be one of the following values:
- USART_AutoBaudRate_StartBit: Start Bit duration measurement.
- USART_AutoBaudRate_FallingEdge: Falling edge to falling edge measurement.
- USART_AutoBaudRate_0x7FFrame: 0x7F frame.
- USART_AutoBaudRate_0x55Frame: 0x55 frame.
|
- Note
- This function has to be called before calling USART_Cmd() function.
- Return values
-
Definition at line 872 of file stm32f30x_usart.c.
Determines if the USART is in mute mode or not.
- Parameters
-
USARTx | where x can be 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or UART peripheral. |
NewState | new state of the USART mute mode. This parameter can be: ENABLE or DISABLE. |
- Return values
-
Definition at line 645 of file stm32f4xx_usart.c.
void USART_SetAddress |
( |
USART_TypeDef * |
USARTx, |
|
|
uint8_t |
USART_Address |
|
) |
| |
Sets the address of the USART node.
- Parameters
-
USARTx | where x can be 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or UART peripheral. |
USART_Address | Indicates the address of the USART node. |
- Return values
-
Definition at line 625 of file stm32f4xx_usart.c.
void USART_WakeUpConfig |
( |
USART_TypeDef * |
USARTx, |
|
|
uint16_t |
USART_WakeUp |
|
) |
| |
Selects the USART WakeUp method.
- Parameters
-
USARTx | where x can be 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or UART peripheral. |
USART_WakeUp | specifies 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
-
Definition at line 672 of file stm32f4xx_usart.c.