I2C ROM API problem (LPC812)

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

I2C ROM API problem (LPC812)

548 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nolex90 on Sun Oct 26 14:32:30 MST 2014
Hello guys, I'm new in the LPC programming.

But I can't use the I2C module.
I tried to modificate the base I2C source file, but I always receive 60001 (NAK) and(TIMEOUT) 60009 error code. I would like to read MPU6050 (It works fine with other MCU). The pullup resistor is 4,4k.

You can find the source files.

I don't know exactly what is the problem. I use 400kbps, and a huge timeout (#define I2C_TIMEOUT 6000000)

Thank you: Matyas

Original Attachment has been moved to: main_11.c.zip

Original Attachment has been moved to: periph_i2c_rom.c.zip

Original Attachment has been moved to: i2c.h.zip

Labels (1)
0 Kudos
3 Replies

400 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_Paul on Mon Nov 03 08:32:34 MST 2014
What pins were you planning to use for the I2C pins?
I changed the iocon_8xx.h file to use the open-drain pins as follows:

IOCON_PIO10 =  0x0A,/*!< PIO0_10 */
IOCON_PIO11 =  0x0B,/*!< PIO0_11 */

After making these changes, the I2C interface seemed to work correctly.
Regards
Paul
0 Kudos

400 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nolex90 on Sun Nov 02 09:41:14 MST 2014
Here is the complete project.
0 Kudos

400 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_Paul on Wed Oct 29 07:00:16 MST 2014
Hello
Can you attach your entire project?

Regards
Paul
0 Kudos