2021-03-16 04:57 AM
Hi all,
I read STM32F4 MCU family doesn't support SMBus because of hardware limitations in the I2C cell. For this reason SMBus is not included in the HAL driver. If I choose STM32F439ZI in STM32CubeMX and I activate I2C, I can select between 3 different modes, as shown in the picture below. So I'm very confused. Does STM32F4 family support or not SMBus? Is there STM32F4 family SMBus HAL Driver?
Thank you
Best regards,
Antonio
Solved! Go to Solution.
2021-03-16 07:07 AM
Hi @AFara.2 ,
> I read STM32F4 MCU family doesn't support SMBus because of hardware limitations in the I2C cell.
Could you please precise the source of this information?
In fact, referring to STM32F439xx Data Sheet as Reference Manual, I²C bus interfaces support SMBus 2.0 matching the available options in STM32CubeMX interface.
Furthermore, STM32Cube MCU Package for STM32F4 series provides SMBUS HAL module driver: stm32f4xx_hal_smbus.c file providing firmware functions to manage the functionalities of the System Management Bus (SMBus) peripheral. You can find more details about HAL SMBUS Generic Driver in the Description of STM32F4 HAL and low-layer drivers.
A device limitation is described in the STM32F43xx Errata sheet mentioning that The I2C peripheral is not fully compliant with the SMBus v2.0. This limitation comes with a workaround.
Hope this clarifies the point.
Do not hesitate to share your feedback.
Khouloud.
2021-03-16 07:07 AM
Hi @AFara.2 ,
> I read STM32F4 MCU family doesn't support SMBus because of hardware limitations in the I2C cell.
Could you please precise the source of this information?
In fact, referring to STM32F439xx Data Sheet as Reference Manual, I²C bus interfaces support SMBus 2.0 matching the available options in STM32CubeMX interface.
Furthermore, STM32Cube MCU Package for STM32F4 series provides SMBUS HAL module driver: stm32f4xx_hal_smbus.c file providing firmware functions to manage the functionalities of the System Management Bus (SMBus) peripheral. You can find more details about HAL SMBUS Generic Driver in the Description of STM32F4 HAL and low-layer drivers.
A device limitation is described in the STM32F43xx Errata sheet mentioning that The I2C peripheral is not fully compliant with the SMBus v2.0. This limitation comes with a workaround.
Hope this clarifies the point.
Do not hesitate to share your feedback.
Khouloud.
2021-03-16 07:51 AM
Hi @Khouloud OTHMAN ,
thank you for the quick reply. I read that information here: https://community.st.com/s/question/0D50X00009XkdjqSAB/stm32f429-smbus-implementation
Ok it's clear, so I can use my STM32F439 MCU to communicate with an external chip over SMBus. Please could you show some STM32F4 family examples if there are?
Thank you,
Antonio