MPC5668G I2C working?

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

MPC5668G I2C working?

Jump to solution
799 Views
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 Kudos
1 Solution
395 Views
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

View solution in original post

0 Kudos
1 Reply
396 Views
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 Kudos