I2C ROM API problem (LPC812)

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

I2C ROM API problem (LPC812)

1,262件の閲覧回数
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

ラベル(1)
0 件の賞賛
返信
3 返答(返信)

1,114件の閲覧回数
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 件の賞賛
返信

1,114件の閲覧回数
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 件の賞賛
返信

1,114件の閲覧回数
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 件の賞賛
返信