STOP Mode functions.
More...
STOP Mode functions.
===============================================================================
##### 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.
void USART_STOPModeCmd |
( |
USART_TypeDef * |
USARTx, |
|
|
FunctionalState |
NewState |
|
) |
| |
Enables or disables the specified USART peripheral in STOP Mode.
- Parameters
-
USARTx,: | where x can be 1 or 2 or 3 to select the USART peripheral. |
NewState,: | new 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
-
void USART_StopModeWakeUpSourceConfig |
( |
USART_TypeDef * |
USARTx, |
|
|
uint32_t |
USART_WakeUpSource |
|
) |
| |
Selects the USART WakeUp method form stop mode.
- Parameters
-
USARTx,: | where x can be 1 or 2 or 3 to select the USART peripheral. |
USART_WakeUp,: | specifies 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
-