2016-11-14 10:54 PM
Dear all,
for a project I have to implement a SMBus communication with a battery. I already found the X-CUBE-SMBUS Software but it seems that it is only compatible with F0 and F3 Controllers. I also saw that these controllers include SMBus HAL drivers. My question is now if it is possible to port those libraries to the STM32F4 and which changes are necessry.
Greetings
#stm32f4 #smbus2017-09-15 01:54 PM
>>which is quite a big pain.
You have to write several hundred lines of code and understand the hardware you are using, I'd be watching out for the robots....
2017-09-25 03:28 PM
Dear ST,
Can you please provide an update on the progress of SMBus support in the F4 family?
I am using a 32F427 with HAL library version 1.16.0.
I urgently require SMBus functionality to talk to a Texas Instruments Battery Pack Manager (e.g. BQ40Z50). I also have an EEPROM on the same I2C bus, which I'm already talking to.
Any suggestions on how to proceed would be greatly appreciated.
Regards,
Matt.
2017-09-26 02:16 AM
Hello,
You need the driver HAL SMBUS ? or you want the driver HAL SMBUS and the Firmware stack SMBUS ?
Could you please confirm if you need the SMBUS to do full feature of SMBUS or you can use Repeat feature on HAL I2C ?
Best Regards
Imen
2017-09-26 02:58 AM
Hi all,
In my case, it turned out that I don't need a full functionality of SMBUS and I2C was enough.
Separately from posting on the forum I sent a question to the technical support, here is part of the reply which might be interesting to all those who wait for the SMBUS support on any of the mentioned series:
'
The SMBUS support in the HAL library is not planned because of hardware limitations in the I2C cell.
This is true for the following STM32 series: STM32F1, STM32F2, STM32F4, STM32L1.
Full SMBUS support is not possible for those devices and this is the reason why smbus is not included in the HAL driver.'
Hardware which supports SMBUS is F3 and F7 series. Note however that in many cases you can use I2C just as well, so before switching the hardware make sure that you need all features of SMBUS.
Best regards,
Przemek2017-09-26 05:11 AM
Hi Imen,
I haven't done this before, so I'm not completely sure what SMBUS
drivers/firmware I might need.
What I need is to be able to read the current capacity of my Li-Ion
batteries. Today I started using the I2C mem read function (because I'm
using the same function to read an EEPROM device on the same bus) which
looks to be working. So I think I'm good.
I assumed because there is SMBUS HAL functions, that the I2C functions
wouldn't work.
Can you tell me more about this REPEAT function. How do I use it. And when
might I need it.
Regards,
Matt.
2017-09-26 09:38 AM
Hi,
By using the sequential feature on HAL I2C, you can manage common use case of SMBUS specification except :
Alert management
Timeout
Packet Error Check
Have a look to the these examples available on STM32Cube firmware package to perform I2C data buffer sequential transmission/reception between two boards using an interrupt :
I2C_TwoBoards_RestartAdvComIT
I2C_TwoBoards_RestartComIT
- STM32Cube_FW_F4_V1.16.0\Projects\STM32F429I-Discovery\Examples\I2C\I2C_TwoBoards_RestartAdvComIT
- STM32Cube_FW_F4_V1.16.0\Projects\STM32F429I-Discovery\Examples\I2C\I2C_TwoBoards_RestartComIT
Kind Regards,Imen.
2017-10-03 03:38 PM
Hi all & Przemek
I have the same issue - lack of SMBus support for L1 series in HAL. Which protocols have you implemented via I2c primitives? I need SMBus block read&write only.
Regards
KR2017-10-03 03:45 PM
Hi KR,
In my case use of the bus is very simplistic. I only have a single memory cell access, so no block reading.
For your reference I am communicating with battery charger EB335.
I guess it won't help, but it clarifies what I do. I just had a quick look at the header file of the HAL i2c. There is a memory read option HAL_I2C_Mem_Read_DMA. Perhaps that's something to investigate. I have no idea how different is memory block reading between standard I2C and SMBus.
Best,
Przemek2018-05-29 03:57 AM
Is the SMBus HAL library now available?
Best regards
2018-07-05 01:43 PM
Hello everyone. Please try the code in following repository