STM8L15x Standard Peripherals Drivers: MultiProcessor Communication functions

STM8L15x/16x Standard Peripherals Drivers

STM8L15x Standard Peripherals Drivers

MultiProcessor Communication functions

Multi-Processor Communication functions. More...

Functions

void USART_ReceiverWakeUpCmd (USART_TypeDef *USARTx, FunctionalState NewState)
 Determines if the USART is in mute mode or not.
void USART_SetAddress (USART_TypeDef *USARTx, uint8_t USART_Address)
 Sets the address of the USART node.
void USART_WakeUpConfig (USART_TypeDef *USARTx, USART_WakeUp_TypeDef USART_WakeUp)
 Selects the USART WakeUp method.

Detailed Description

Multi-Processor Communication 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:
     1. 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.
     2. Configures the USART address using the USART_SetAddress() function.
     3. Configures the wake up method (USART_WakeUp_IdleLine or USART_WakeUp_AddressMark)
        using USART_WakeUpConfig() function only for the slaves.
     4. Enable the USART using the USART_Cmd() function.
     5. Enter the USART slaves in mute mode using USART_ReceiverWakeUpCmd() function.

  The USART Slave exit from mute mode when receiving the wake up condition.


Function Documentation

void USART_ReceiverWakeUpCmd ( USART_TypeDef USARTx,
FunctionalState  NewState 
)

Determines if the USART is in mute mode or not.

Parameters:
USARTx,:where x can be 1 to select the specified USART peripheral.
NewState,:The new state of the USART mode. This parameter can be: ENABLE or DISABLE.
Return values:
None

Definition at line 467 of file stm8l15x_usart.c.

References USART_struct::CR2, DISABLE, IS_FUNCTIONAL_STATE, and USART_CR2_RWU.

void USART_SetAddress ( USART_TypeDef USARTx,
uint8_t  USART_Address 
)

Sets the address of the USART node.

Parameters:
USARTx,:Select the USARTx peripheral.
Address,:Indicates the address of the USART node. This parameter should be lower than 16
Return values:
None

Definition at line 490 of file stm8l15x_usart.c.

References USART_struct::CR4, IS_USART_ADDRESS, and USART_CR4_ADD.

void USART_WakeUpConfig ( USART_TypeDef USARTx,
USART_WakeUp_TypeDef  USART_WakeUp 
)

Selects the USART WakeUp method.

Parameters:
USART_WakeUp,:Specifies the USART wakeup method. This parameter can be one of the following values:
  • USART_WakeUp_IdleLine: 0x01 Idle Line wake up
  • USART_WakeUp_AddressMark: 0x02 Address Mark wake up
Return values:
None

Definition at line 509 of file stm8l15x_usart.c.

References USART_struct::CR1, IS_USART_WAKEUP, and USART_CR1_WAKE.

STM8S Firmware Library: Overview

 

 

 

For complete documentation on STM8L15x 8-bit microcontrollers platform visit www.st.com