LPC11u68 I2C driver initialization..

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

LPC11u68 I2C driver initialization..

620 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sunilforu@gmail.com on Tue Aug 05 19:32:18 MST 2014
Hi,
I am new to LPC firmware programming.
I am using LPC11u68 Xpresso Board.I have connected two pins.

PIO0_4 --SCL
PIO0_5--SDA.  to my I2C salve device and trying to read the data through
API Chip_I2C_MasterTransfer()  but I see no activity on the probe and also its always
stuck at Chip_I2C_EventHandler()

When used as GPIO I can see some activity on the probe but as IO pin no activity on the bus

I want someone to

1. Verify(if something is missing) or provide the the I2C initialization required.
               
                Chip_I2C_Init(I2C0);
Chip_I2C_SetClockRate(I2C0, 100000);
Chip_I2C_SetMasterEventHandler(I2C0, Chip_I2C_EventHandler);
NVIC_EnableIRQ(I2C0_IRQn);

2. Do I have set/change in the board_sysinit.c some MUX configuration for pin 4 and 5.

Any sample implementation for I2C salve device is highly appreciated.

Regards
Sunil
0 Kudos
Reply
1 Reply

569 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by serge on Tue Aug 12 13:59:07 MST 2014
Just a guess: PIO0_4 and PIO0_5 are open drain pins.
I don't know the schematics of your board but are there pull-up resistors on the board? Just checked and there are two 2k2 resistors on the board.
Is your IOCON register ok?

0 Kudos
Reply