LPC1769 I2C example is not working

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC1769 I2C example is not working

1,043件の閲覧回数
kalpeshbalar
Contributor II

Hi,

I am using LPCExpresso LPC1769 REV C board.

I am running "lpcopen_2_10_lpcxpresso_nxp_lpcxpresso_1769" samples on this board.

I am trying to run "periph_i2c" example on this board.

But this example is not able to probe I2C device.

Here is Debug output of the example.

**************** I2C Demo Menu ****************

0: Exit Demo

1: Select I2C peripheral [I2C0]

2: Toggle mode POLLING/INTERRUPT [INTERRUPT]

3: Probe for Slave devices

4: Read slave data

5: Write slave data

6: Write/Read slave data

Select an option [0 - 6] :3

Probing available I2C devices...

00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

====================================================

00                                  

Here I guess When it tries to read first address using API "Chip_I2C_MasterRead" this API call is getting stuck somewhere.

Can you please help me out to successfully run this example? Or can some one share me athe updated program.

Attached is "periph_i2c" example I am using.

ラベル(2)
タグ(2)
1 返信

864件の閲覧回数
victorjimenez
NXP TechSupport
NXP TechSupport

Hello, 

Which pins are you using for SDA1 and SCL1? I think that you are using P0.19 and P0.20 respectively, since these are the pins that the readme file says. However, the pins you are actually initializing for I2C1 when you call the function i2c_app_init(I2C1, SPEED_100KHZ); in the main are P0.0 and P0.1 instead of P0.19 and P0.20 so you need to move the connections. Once you make these changes the example works as it should. This bug in the readme file was already reported. 

Hope it helps!

Victor.

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

 

0 件の賞賛
返信