2021-02-10 10:24 AM
Hello,
In document : https://www.stmicroelectronics.com.cn/resource/en/application_note/dm00528962-teseoliv3f--i2c-positioning-sensor--stmicroelectronics.pdf pase 16.
is it mandatory to have below code in a while loop?
HAL_I2C_DeInit(&hi2c1);
HAL_I2C_Init(&hi2c1);
Why cant we init i2c just once?
Second question :
This set of commands will: Reset the i2c message list Disable the eco-ing message Save the configuration on flash
>
$PSTMCFGMSGL,3,1,0,0 $PSTMSETPAR,1227,1,2 $PSTMSAVEPAR
Can you please tell the similiar code being used in the GetPos_I2C example for L476RG where we are using this commandset to enable i2c?
Third and last question :
If we have to use the uart again(between STM32 and Teseo) , what command set to be sent ?
Br,
2021-02-10 02:52 PM
The deint/init does seem unnecessary, the bus typically doesn't need resetting unless you have an error. In many cases it might not help because the devices lack an asynchronous reset.
The trick here is to perhaps actually try things, and experiment.
Perhaps find someone in the local sales office, or engineering support, who can provide you with assistance and/or direction.