Skip to main content
parth
Associate II
January 3, 2017
Question

Problem in i2c read using HAL library api

  • January 3, 2017
  • 1 reply
  • 705 views
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
This topic has been closed for replies.

1 reply

Technical Moderator
January 3, 2017
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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks