Extended features functions.
More...
Extended features functions.
===============================================================================
##### Extended features functions #####
===============================================================================
[..] This section provides functions allowing to:
(+) Configure Noise Filters
(+) Configure Wake Up Feature
(+) Configure Fast Mode Plus
◆ HAL_I2CEx_ConfigAnalogFilter()
| HAL_StatusTypeDef HAL_I2CEx_ConfigAnalogFilter |
( |
I2C_HandleTypeDef * |
hi2c, |
|
|
uint32_t |
AnalogFilter |
|
) |
| |
Configure I2C Analog noise filter.
- Parameters
-
| hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2Cx peripheral. |
| AnalogFilter | New state of the Analog filter. |
- Return values
-
Definition at line 97 of file stm32l4xx_hal_i2c_ex.c.
111 __HAL_I2C_DISABLE(hi2c);
114 hi2c->
Instance->CR1 &= ~(I2C_CR1_ANFOFF);
117 hi2c->
Instance->CR1 |= AnalogFilter;
119 __HAL_I2C_ENABLE(hi2c);
__IO HAL_I2C_StateTypeDef State
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))
◆ HAL_I2CEx_ConfigDigitalFilter()
| HAL_StatusTypeDef HAL_I2CEx_ConfigDigitalFilter |
( |
I2C_HandleTypeDef * |
hi2c, |
|
|
uint32_t |
DigitalFilter |
|
) |
| |
Configure I2C Digital noise filter.
- Parameters
-
| hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2Cx peripheral. |
| DigitalFilter | Coefficient of digital noise filter between Min_Data=0x00 and Max_Data=0x0F. |
- Return values
-
Definition at line 141 of file stm32l4xx_hal_i2c_ex.c.
157 __HAL_I2C_DISABLE(hi2c);
163 tmpreg &= ~(I2C_CR1_DNF);
166 tmpreg |= DigitalFilter << 8U;
171 __HAL_I2C_ENABLE(hi2c);
__IO HAL_I2C_StateTypeDef State
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))
◆ HAL_I2CEx_DisableFastModePlus()
| void HAL_I2CEx_DisableFastModePlus |
( |
uint32_t |
ConfigFastModePlus | ) |
|
Disable the I2C fast mode plus driving capability.
- Parameters
-
- Note
- For I2C1, fast mode plus driving capability can be disabled on all selected I2C1 pins using I2C_FASTMODEPLUS_I2C1 parameter or independently on each one of the following pins PB6, PB7, PB8 and PB9.
-
For remaining I2C1 pins (PA14, PA15...) fast mode plus driving capability can be disabled only by using I2C_FASTMODEPLUS_I2C1 parameter.
-
For all I2C2 pins fast mode plus driving capability can be disabled only by using I2C_FASTMODEPLUS_I2C2 parameter.
-
For all I2C3 pins fast mode plus driving capability can be disabled only by using I2C_FASTMODEPLUS_I2C3 parameter.
-
For all I2C4 pins fast mode plus driving capability can be disabled only by using I2C_FASTMODEPLUS_I2C4 parameter.
- Return values
-
Definition at line 310 of file stm32l4xx_hal_i2c_ex.c.
316 __HAL_RCC_SYSCFG_CLK_ENABLE();
319 CLEAR_BIT(SYSCFG->CFGR1, (uint32_t)ConfigFastModePlus);
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))
◆ HAL_I2CEx_DisableWakeUp()
Disable I2C wakeup from Stop mode(s).
- Parameters
-
| hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2Cx peripheral. |
- Return values
-
Definition at line 231 of file stm32l4xx_hal_i2c_ex.c.
244 __HAL_I2C_DISABLE(hi2c);
247 hi2c->
Instance->CR1 &= ~(I2C_CR1_WUPEN);
249 __HAL_I2C_ENABLE(hi2c);
__IO HAL_I2C_StateTypeDef State
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))
◆ HAL_I2CEx_EnableFastModePlus()
| void HAL_I2CEx_EnableFastModePlus |
( |
uint32_t |
ConfigFastModePlus | ) |
|
Enable the I2C fast mode plus driving capability.
- Parameters
-
- Note
- For I2C1, fast mode plus driving capability can be enabled on all selected I2C1 pins using I2C_FASTMODEPLUS_I2C1 parameter or independently on each one of the following pins PB6, PB7, PB8 and PB9.
-
For remaining I2C1 pins (PA14, PA15...) fast mode plus driving capability can be enabled only by using I2C_FASTMODEPLUS_I2C1 parameter.
-
For all I2C2 pins fast mode plus driving capability can be enabled only by using I2C_FASTMODEPLUS_I2C2 parameter.
-
For all I2C3 pins fast mode plus driving capability can be enabled only by using I2C_FASTMODEPLUS_I2C3 parameter.
-
For all I2C4 pins fast mode plus driving capability can be enabled only by using I2C_FASTMODEPLUS_I2C4 parameter.
- Return values
-
Definition at line 281 of file stm32l4xx_hal_i2c_ex.c.
287 __HAL_RCC_SYSCFG_CLK_ENABLE();
290 SET_BIT(SYSCFG->CFGR1, (uint32_t)ConfigFastModePlus);
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))
◆ HAL_I2CEx_EnableWakeUp()
Enable I2C wakeup from Stop mode(s).
- Parameters
-
| hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2Cx peripheral. |
- Return values
-
Definition at line 192 of file stm32l4xx_hal_i2c_ex.c.
205 __HAL_I2C_DISABLE(hi2c);
208 hi2c->
Instance->CR1 |= I2C_CR1_WUPEN;
210 __HAL_I2C_ENABLE(hi2c);
__IO HAL_I2C_StateTypeDef State
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))