I have been trying to use the EFM8LB1 - SLSTK2030A MCU development kit as I2C Master to connect and read from a Sensirion SHT3x humidity sensor which supports only I2C fast mode of operation (any SCL frequency between 0 and 1000kHz). I went through the example of SMBus_MasterMultibyte in Simplicity Studio to realize this operation. However it seems the example has been designed for the default/normal I2C mode because I haven't been able to establish any communication between the sensor and the MCU using this example code. Is there anyway I can modify this SMBus_Multibyte example code for Fast Mode I2C operation or is there a separate example code I should follow for the same purpose? I believe the MCU supports both the normal and fast SMBus modes as mentioned in the MCU datasheet.
Thank You for your help in advance!
according the datasheet and reference manual the SMBus support standard and fast mode. The I2C slave (only slave mode supported) support fast plus and high speed.
As your sensor support any speed between 0 and 1000kHz, do you have a chance to see the I2C/SMBus signals, why it not work with low speed that the example code use.
You could change the speed, I think an easy way is to use the hardware configurator to change it, there is an configurator file for each example and you could try to change it.
I tried to change the SCL bus frequency in .hwconf file but couldn't find a way to do it. I am attaching a screenshot of the place where I found it. Kindly let me know if that is where I need to change the value somehow. I found another mention of the bus frequency in EFM8LB1_SMBus_Master_Multibyte.h file but I believe changing that wouldn't help. Kindly comment on how to do it.
I did change the frequency of the SMBUS SCL as suggested but it didn't solve the problem. The sensor stil NACKs the START command and doesn't acknowledge its own address. Any other suggestions? Here's a picture of the sensor's timing diagram and I2C specs.