2020-09-28 06:25 AM
Hi all,
I am trying to interface a STM32L073RZ to a Si2151 tuner IC using I2C. I keep getting HAL_ERROR everytime i use the HAL_I2C_Master_Transmit function. I used STM32cubeMx to set the I2C parameter settings (freq to 400K) but the generated code has hi2c1.Init.Timing = 0x00000000; which i am not sure is correct. Do i need to edit this timing manually ? I found an I2C timing register config tool but that was for STM32F series and not the L series.
Any help is greatly appreciated..
Thanks,
H
2020-10-02 12:19 PM
The RM0367 Reference manual contains more info and an example in the appendix. The example mentions "Timing register value is computed with the AN4235 xls file". Did you select a proper clock?