MPC5668G I2C working?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MPC5668G I2C working?

跳至解决方案
831 次查看
lanceu
Contributor I

Has anyone been able to make the i2c work on the mpc5668g? Here is my setup:

  • I set the ibfd to 0xbf (mul=4, icr=3f). I figure let's get going at the slowest rate before bumping it up
  • I set ibad to my address (I've tried various addresses with no differing results)
  • I set ibcr to 0 (clear mdis)
  • I set PC11 and PC12 to function 3 and ODE
  • I set ibcr to 0x20 (master mode)
  • I set ibcr to 0x30 (master/transmit mode)
  • As soon as I do this ibsr gets set to 0x92 (TCF, IBAL, IBIF), and because IBAL is set ibcr gets set to 0x10 (master mode disabled)

Any ideas what I'm doing wrong? Sample code for this part would help.

 

Thanks,

Lance

0 项奖励
1 解答
427 次查看
lanceu
Contributor I

Through sheer desperation I tried setting up PC11 and PC12 as function2, and my problem went away. I guess this is a typo in the manual.

 

-Lance

在原帖中查看解决方案

0 项奖励
1 回复
428 次查看
lanceu
Contributor I

Through sheer desperation I tried setting up PC11 and PC12 as function2, and my problem went away. I guess this is a typo in the manual.

 

-Lance

0 项奖励