i2c LPC11C24 Stuck in Busy Line

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i2c LPC11C24 Stuck in Busy Line

1,232 Views
mtm
Contributor I

Hi all,

 

I would really appreciate any comments/thoughs about this:

 

I`m using a PLC11C24 Dev Board for an i2c communication program.

 

However my setup seems to get stuck here:

155266_155266.pngpastedImage_0.png

 

Seems that the line stays busy. Osciloscope shows a falling edge on SCA as well as on SCL, when I use debugging mode.

I also get a State 0X68

Attached is my complete main file for your refence.

 

Also my hardware setup is just 2 pull up resistors on SCA on SCL, no slave device. I'm assuming I should see a Start Pulse + Slave Address + R/W bit and no ACK return bit (since there is no slave device). But this is not happening.

 

I appreciate any help on this.

 

Cheers,

Original Attachment has been moved to: practice_i2c.c.txt.zip

0 Kudos
3 Replies

706 Views
aresmarser
Contributor III

Hi mtm,

Have you resolved your problem?

Could you be kindly to share how you resolved it?

Because I also met a similar issue as you (the difference is that I am using NHS3100 board/kit).

It is appreciated if you could share anything or advice.

Thanks,

Arna

0 Kudos

705 Views
danielholala
Senior Contributor II

I suggest to have a look at my comment and code suggestions. Maybe you can patch your code accordingly to alleviate the i2c issues.

0 Kudos

706 Views
isaacavila
NXP Employee
NXP Employee

Hello,

According to LPC11Cxx User Manual (http://www.nxp.com/documents/user_manual/UM10398.pdf?fasp=1&WT_TYPE=Users%20Guides&WT_VENDOR=FREESCA... ) status 0x68 means that Arbitration lost in SLA + R/W as master:

State.jpg

So, it seems that SLA + W bit are being sent and you got an arbitration lost status (another master activity on the bus?).

Have you tried to debug the MasterHandler function?

When you use interrupt driver mode:

/* Set default mode to interrupt */

    i2c_set_mode(id, 0);

IRQ for I2C0 is enabled and inside this ISR, the i2c_state_handling function is called. If you debug further, you will end up at handleMasterXferState function (i2c_11xx.c, line 176) that is in charged to validate transfer status.

Hope this helps!

Regards,

Isaac

0 Kudos