AnsweredAssumed Answered

K60 I2C alternate function in board TWR-K60N512

Question asked by Hareesha Suvarna on Jan 7, 2012
Latest reply on Jan 9, 2012 by Hareesha Suvarna

Hi All,

 

I am working freescale board TWR-K60N512. I am trying to write I2 driver for kinetics.

 

Below is the piece of code for I2C alternate function in board TWR-K60N512

 

//Clock gate
  SIM_SCGC4 |= SIM_SCGC4_I2C0_MASK;
  SIM_SCGC5 |= SIM_SCGC5_PORTD_MASK;

 
  PORTD_PCR8 &= ~PORT_PCR_MUX_MASK;
  PORTD_PCR8 |= PORT_PCR_MUX(2); //I2C0SCL
  PORTD_PCR9 &= ~PORT_PCR_MUX_MASK;
  PORTD_PCR9 |= PORT_PCR_MUX(2); //I2C0SDA
 
  _ki2c_int_install("ii2c0:", &_bsp_i2c0_init).

 

Is this mapping is right?

 

Regards,'

Hareesha

Outcomes