Keil Logo

i2c read problem

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
sneha shairak
Posted
10-May-2018 09:14 GMT
Toolset
ARM
New! i2c read problem

Hi

i am a beginner in this form. i am using STM32F051 discovery board.i have a problem in reading of pca9536 i/o expander throgh i2c. here i got the output till resend the address for read operation. Data is not receiving in stm32f051,SCL is also not sending at this time. the code for read is given below.please help me to rectify this problem.
while(I2C_GetFlagStatus(I2C1, I2C_FLAG_TCR) == SET);
I2C_TransferHandling(I2C1, PCAAddr, 1, I2C_Reload_Mode, I2C_No_StartStop);
while(I2C_GetFlagStatus(I2C1, I2C_FLAG_RXNE) == RESET); K = I2C_ReceiveData(I2C1);

Next Thread | Thread List | Previous Thread Start a Thread | Settings

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.