cancel
Showing results for 
Search instead for 
Did you mean: 

Setting the I2C timing register values for STM32L073RZ

HPala.1
Associate

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

1 REPLY 1
KnarfB
Principal III

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?