STM32L4xx_HAL_Driver  1.14.0

Functions

__STATIC_INLINE void LL_SWPMI_SetReceptionMode (SWPMI_TypeDef *SWPMIx, uint32_t RxBufferingMode)
 Set Reception buffering mode. More...
 
__STATIC_INLINE uint32_t LL_SWPMI_GetReceptionMode (SWPMI_TypeDef *SWPMIx)
 Get Reception buffering mode CR RXMODE LL_SWPMI_GetReceptionMode. More...
 
__STATIC_INLINE void LL_SWPMI_SetTransmissionMode (SWPMI_TypeDef *SWPMIx, uint32_t TxBufferingMode)
 Set Transmission buffering mode. More...
 
__STATIC_INLINE uint32_t LL_SWPMI_GetTransmissionMode (SWPMI_TypeDef *SWPMIx)
 Get Transmission buffering mode CR TXMODE LL_SWPMI_GetTransmissionMode. More...
 
__STATIC_INLINE void LL_SWPMI_EnableLoopback (SWPMI_TypeDef *SWPMIx)
 Enable loopback mode CR LPBK LL_SWPMI_EnableLoopback. More...
 
__STATIC_INLINE void LL_SWPMI_DisableLoopback (SWPMI_TypeDef *SWPMIx)
 Disable loopback mode CR LPBK LL_SWPMI_DisableLoopback. More...
 
__STATIC_INLINE void LL_SWPMI_Activate (SWPMI_TypeDef *SWPMIx)
 Activate Single wire protocol bus (SUSPENDED or ACTIVATED state) More...
 
__STATIC_INLINE uint32_t LL_SWPMI_IsActivated (SWPMI_TypeDef *SWPMIx)
 Check if Single wire protocol bus is in ACTIVATED state. CR SWPACT LL_SWPMI_Activate. More...
 
__STATIC_INLINE void LL_SWPMI_Deactivate (SWPMI_TypeDef *SWPMIx)
 Deactivate immediately Single wire protocol bus (immediate transition to DEACTIVATED state) CR SWPACT LL_SWPMI_Deactivate. More...
 
__STATIC_INLINE void LL_SWPMI_RequestDeactivation (SWPMI_TypeDef *SWPMIx)
 Request a deactivation of Single wire protocol bus (request to go in DEACTIVATED state if no resume from slave) CR DEACT LL_SWPMI_RequestDeactivation. More...
 
__STATIC_INLINE void LL_SWPMI_SetBitRatePrescaler (SWPMI_TypeDef *SWPMIx, uint32_t BitRatePrescaler)
 Set Bitrate prescaler SWPMI_freq = SWPMI_clk / (((BitRate) + 1) * 4) BRR BR LL_SWPMI_SetBitRatePrescaler. More...
 
__STATIC_INLINE uint32_t LL_SWPMI_GetBitRatePrescaler (SWPMI_TypeDef *SWPMIx)
 Get Bitrate prescaler BRR BR LL_SWPMI_GetBitRatePrescaler. More...
 
__STATIC_INLINE void LL_SWPMI_SetVoltageClass (SWPMI_TypeDef *SWPMIx, uint32_t VoltageClass)
 Set SWP Voltage Class OR CLASS LL_SWPMI_SetVoltageClass. More...
 
__STATIC_INLINE uint32_t LL_SWPMI_GetVoltageClass (SWPMI_TypeDef *SWPMIx)
 Get SWP Voltage Class OR CLASS LL_SWPMI_GetVoltageClass. More...
 

Detailed Description

Function Documentation

◆ LL_SWPMI_Activate()

__STATIC_INLINE void LL_SWPMI_Activate ( SWPMI_TypeDef *  SWPMIx)

Activate Single wire protocol bus (SUSPENDED or ACTIVATED state)

Note
SWP bus stays in the ACTIVATED state as long as there is a communication with the slave, either in transmission or in reception. The SWP bus switches back to the SUSPENDED state as soon as there is no more transmission or reception activity, after 7 idle bits. CR SWPACT LL_SWPMI_Activate
Parameters
SWPMIxSWPMI Instance
Return values
None

Definition at line 336 of file stm32l4xx_ll_swpmi.h.

337 {
338  /* In order to activate SWP again, the software must clear DEACT bit*/
339  CLEAR_BIT(SWPMIx->CR, SWPMI_CR_DEACT);
340 
341  /* Set SWACT bit */
342  SET_BIT(SWPMIx->CR, SWPMI_CR_SWPACT);
343 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_SWPMI_Deactivate()

__STATIC_INLINE void LL_SWPMI_Deactivate ( SWPMI_TypeDef *  SWPMIx)

Deactivate immediately Single wire protocol bus (immediate transition to DEACTIVATED state) CR SWPACT LL_SWPMI_Deactivate.

Parameters
SWPMIxSWPMI Instance
Return values
None

Definition at line 363 of file stm32l4xx_ll_swpmi.h.

364 {
365  CLEAR_BIT(SWPMIx->CR, SWPMI_CR_SWPACT);
366 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_SWPMI_DisableLoopback()

__STATIC_INLINE void LL_SWPMI_DisableLoopback ( SWPMI_TypeDef *  SWPMIx)

Disable loopback mode CR LPBK LL_SWPMI_DisableLoopback.

Parameters
SWPMIxSWPMI Instance
Return values
None

Definition at line 321 of file stm32l4xx_ll_swpmi.h.

322 {
323  CLEAR_BIT(SWPMIx->CR, SWPMI_CR_LPBK);
324 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_SWPMI_EnableLoopback()

__STATIC_INLINE void LL_SWPMI_EnableLoopback ( SWPMI_TypeDef *  SWPMIx)

Enable loopback mode CR LPBK LL_SWPMI_EnableLoopback.

Parameters
SWPMIxSWPMI Instance
Return values
None

Definition at line 310 of file stm32l4xx_ll_swpmi.h.

311 {
312  SET_BIT(SWPMIx->CR, SWPMI_CR_LPBK);
313 }

◆ LL_SWPMI_GetBitRatePrescaler()

__STATIC_INLINE uint32_t LL_SWPMI_GetBitRatePrescaler ( SWPMI_TypeDef *  SWPMIx)

Get Bitrate prescaler BRR BR LL_SWPMI_GetBitRatePrescaler.

Parameters
SWPMIxSWPMI Instance
Return values
Anumber between Min_Data=0 and Max_Data=63U

Definition at line 398 of file stm32l4xx_ll_swpmi.h.

399 {
400  return (uint32_t)(READ_BIT(SWPMIx->BRR, SWPMI_BRR_BR));
401 }

◆ LL_SWPMI_GetReceptionMode()

__STATIC_INLINE uint32_t LL_SWPMI_GetReceptionMode ( SWPMI_TypeDef *  SWPMIx)

Get Reception buffering mode CR RXMODE LL_SWPMI_GetReceptionMode.

Parameters
SWPMIxSWPMI Instance
Return values
Returnedvalue can be one of the following values:
  • LL_SWPMI_SW_BUFFER_RX_SINGLE
  • LL_SWPMI_SW_BUFFER_RX_MULTI

Definition at line 271 of file stm32l4xx_ll_swpmi.h.

272 {
273  return (uint32_t)(READ_BIT(SWPMIx->CR, SWPMI_CR_RXMODE));
274 }

◆ LL_SWPMI_GetTransmissionMode()

__STATIC_INLINE uint32_t LL_SWPMI_GetTransmissionMode ( SWPMI_TypeDef *  SWPMIx)

Get Transmission buffering mode CR TXMODE LL_SWPMI_GetTransmissionMode.

Parameters
SWPMIxSWPMI Instance
Return values
Returnedvalue can be one of the following values:
  • LL_SWPMI_SW_BUFFER_TX_SINGLE
  • LL_SWPMI_SW_BUFFER_TX_MULTI

Definition at line 299 of file stm32l4xx_ll_swpmi.h.

300 {
301  return (uint32_t)(READ_BIT(SWPMIx->CR, SWPMI_CR_TXMODE));
302 }

◆ LL_SWPMI_GetVoltageClass()

__STATIC_INLINE uint32_t LL_SWPMI_GetVoltageClass ( SWPMI_TypeDef *  SWPMIx)

Get SWP Voltage Class OR CLASS LL_SWPMI_GetVoltageClass.

Parameters
SWPMIxSWPMI Instance
Return values
Returnedvalue can be one of the following values:
  • LL_SWPMI_VOLTAGE_CLASS_C
  • LL_SWPMI_VOLTAGE_CLASS_B

Definition at line 425 of file stm32l4xx_ll_swpmi.h.

426 {
427  return (uint32_t)(READ_BIT(SWPMIx->OR, SWPMI_OR_CLASS));
428 }

◆ LL_SWPMI_IsActivated()

__STATIC_INLINE uint32_t LL_SWPMI_IsActivated ( SWPMI_TypeDef *  SWPMIx)

Check if Single wire protocol bus is in ACTIVATED state. CR SWPACT LL_SWPMI_Activate.

Parameters
SWPMIxSWPMI Instance
Return values
Stateof bit (1 or 0).

Definition at line 351 of file stm32l4xx_ll_swpmi.h.

352 {
353  return ((READ_BIT(SWPMIx->CR, SWPMI_CR_SWPACT) == (SWPMI_CR_SWPACT)) ? 1UL : 0UL);
354 }

◆ LL_SWPMI_RequestDeactivation()

__STATIC_INLINE void LL_SWPMI_RequestDeactivation ( SWPMI_TypeDef *  SWPMIx)

Request a deactivation of Single wire protocol bus (request to go in DEACTIVATED state if no resume from slave) CR DEACT LL_SWPMI_RequestDeactivation.

Parameters
SWPMIxSWPMI Instance
Return values
None

Definition at line 375 of file stm32l4xx_ll_swpmi.h.

376 {
377  SET_BIT(SWPMIx->CR, SWPMI_CR_DEACT);
378 }

◆ LL_SWPMI_SetBitRatePrescaler()

__STATIC_INLINE void LL_SWPMI_SetBitRatePrescaler ( SWPMI_TypeDef *  SWPMIx,
uint32_t  BitRatePrescaler 
)

Set Bitrate prescaler SWPMI_freq = SWPMI_clk / (((BitRate) + 1) * 4) BRR BR LL_SWPMI_SetBitRatePrescaler.

Parameters
SWPMIxSWPMI Instance
BitRatePrescalerA number between Min_Data=0 and Max_Data=63U
Return values
None

Definition at line 387 of file stm32l4xx_ll_swpmi.h.

388 {
389  WRITE_REG(SWPMIx->BRR, BitRatePrescaler);
390 }

◆ LL_SWPMI_SetReceptionMode()

__STATIC_INLINE void LL_SWPMI_SetReceptionMode ( SWPMI_TypeDef *  SWPMIx,
uint32_t  RxBufferingMode 
)

Set Reception buffering mode.

Note
If Multi software buffer mode is chosen, RXDMA bits must also be set. CR RXMODE LL_SWPMI_SetReceptionMode
Parameters
SWPMIxSWPMI Instance
RxBufferingModeThis parameter can be one of the following values:
  • LL_SWPMI_SW_BUFFER_RX_SINGLE
  • LL_SWPMI_SW_BUFFER_RX_MULTI
Return values
None

Definition at line 258 of file stm32l4xx_ll_swpmi.h.

259 {
260  MODIFY_REG(SWPMIx->CR, SWPMI_CR_RXMODE, RxBufferingMode);
261 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_SWPMI_SetTransmissionMode()

__STATIC_INLINE void LL_SWPMI_SetTransmissionMode ( SWPMI_TypeDef *  SWPMIx,
uint32_t  TxBufferingMode 
)

Set Transmission buffering mode.

Note
If Multi software buffer mode is chosen, TXDMA bits must also be set. CR TXMODE LL_SWPMI_SetTransmissionMode
Parameters
SWPMIxSWPMI Instance
TxBufferingModeThis parameter can be one of the following values:
  • LL_SWPMI_SW_BUFFER_TX_SINGLE
  • LL_SWPMI_SW_BUFFER_TX_MULTI
Return values
None

Definition at line 286 of file stm32l4xx_ll_swpmi.h.

287 {
288  MODIFY_REG(SWPMIx->CR, SWPMI_CR_TXMODE, TxBufferingMode);
289 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_SWPMI_SetVoltageClass()

__STATIC_INLINE void LL_SWPMI_SetVoltageClass ( SWPMI_TypeDef *  SWPMIx,
uint32_t  VoltageClass 
)

Set SWP Voltage Class OR CLASS LL_SWPMI_SetVoltageClass.

Parameters
SWPMIxSWPMI Instance
VoltageClassThis parameter can be one of the following values:
  • LL_SWPMI_VOLTAGE_CLASS_C
  • LL_SWPMI_VOLTAGE_CLASS_B
Return values
None

Definition at line 412 of file stm32l4xx_ll_swpmi.h.

413 {
414  MODIFY_REG(SWPMIx->OR, SWPMI_OR_CLASS, VoltageClass);
415 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)