cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in i2c read using HAL library api

parth
Associate II
Posted on January 03, 2017 at 10:16

Hello All,

We are interfacing the OV5642 camera module with STM32f4 discovery board.We are read the camera model no using the i2c protocol. When we are put the break point in the I2C stop condition, we can read the data perfectly, other wise we get the wrong data. we are use IAR IDE.

We generated I2C code use of cubeMx software and we are use HAL library. We use HAL_I2C_mem_read_it(); api for the data read.

Please help us to resolve this issues for the same.

Any help would be highly appreciated ? 

please let me know if you need more information form the our side.

Thanks,

Parth Modi

#stm32f4-discover #i2c #stm32f407
1 REPLY 1
Imen.D
ST Employee
Posted on January 03, 2017 at 12:44

Dear

Modi.Parth

‌,

You may refer to the I2Cexample withinSTM32CubeF4firmware package which provides running applicationsshowing how to use the I2C. So, you canget inspiration from the working example todevelopyour application andidentifywhat is going wrong in your case:STM32Cube_FW_F4_V1.0\Projects\STM32F4-Discovery\Examples\I2C.

Make sure that you are using the latest version of firmware package as contains fix issues in I2C HAL drivers.

Otherwise, I recommend you to refer toyour productreference manual, intheInter-integrated circuit (I2C) interface sectionto have overviewabout I2C main features.

Hope this helps you.

Best Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen