We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello everyone, I'm actually working on the MCBSTM32E eval board which is composed of the STM32F103ZE. It is connected to a smart battery component (BQ2040 from TI). The bus between them is SMBUS, so I connected the BQ to I2C1. I have some questions about this latter. I can easily communicate with the BQ BUT : - First : my own address is always taken by the soft as a 10-bit one instead of a 7-bit (it means that I have to put 0x03 if I want my I2C address to be 0x01) and it is the same when I want to write something in the BQ whose address is 0x0B I have to put 0x17. It seems that I have to add one extra bit (1). How can I change that ? - Second : the example given in µvision directories (ST Examples) uses while loop to wait for an event (as required in . But when an error occurs (like a missing ack), it means that I'm stuck in the loop forever. How could I handle it ? I think when an error occur I should reset the I2C and recall the function, but I have no idea on how to recall it. - Third : I don't know why but the BQ sends me an Ack even after the Data Byte H while it should send nothing or a Nack which would mean that I can generate my stop. I hope my post is not that confusing cause I tried to make as clear as I can. Thanks in advance, Regards Gary
I can not help past this point. If the Libraries do not suit your needs you can code it your self. If the libraries are supported and do not work, check for updates, look at the source code if it is available, or contact the Manufacturer. Sorry I can not help further.