AnsweredAssumed Answered

MCF 52259  Demokit - I2C problem

Question asked by Nilesh Shirbhate on Aug 18, 2009
Latest reply on Aug 18, 2009 by Butcher

I am using MCF 52259 Demokit. I have configured I2C channel 1. I have used J4 connector of DEMOCom  PCB. I have attached I2C_init here.I am checking the frequency of SCL


void init_i2c(void){ unsigned char temp; print("  initializing I2C channel\n");// MCF_GPIO_DDRQS = 1;//0; /* I2C pins configuration channel 1  -> Channel 1 I2c pins are available on connector J4*/ MCF_GPIO_PQSPAR = MCF_GPIO_PQSPAR_PQSPAR1(2)| MCF_GPIO_PQSPAR_PQSPAR0(2);//SDA1(Pin 10) and SCK1(Pin 12)  /*I2C Channel Frequency configuration*/ //MCF_I2C_I2FDR = 0x38;  //For 125 KHz     MCF_I2C_I2FDR = 0x34;  //For 250 KHz /* start the I2C communication */ MCF_I2C_I2CR = 0 | MCF_I2C_I2CR_IEN; /* set Master address */ MCF_I2C_I2AR = MASTER_ADDR; /* if bit busy set, send a stop condition to slave module */ if( MCF_I2C_I2SR & MCF_I2C_I2SR_IBB) {   MCF_I2C_I2CR = 0;      /* clear control register */  MCF_I2C_I2CR = MCF_I2C_I2CR_IEN |  /* enable module */        MCF_I2C_I2CR_MSTA;  /* send a START conditionn */  temp = MCF_I2C_I2DR;     /* dummy read */    MCF_I2C_I2SR = 0;      /* clear status register */  MCF_I2C_I2CR = 0;      /* clear control register */  MCF_I2C_I2CR = 0 | MCF_I2C_I2CR_IEN; /* enable the module again */ }  return; }

 

 on storage oscilloscope. But not geting any Signal Waveform.Please suggest any corrections.

 

thanks 

Outcomes