AnsweredAssumed Answered

Problem MQX-3.8 i2c example (Master) on a MK60DN512VLL10  (100 Pin version)

Question asked by Uwe Boettger on Jan 13, 2016
Latest reply on Jan 14, 2016 by Uwe Boettger

Hi,

I try to run
the MQX-3.8 i2c example (Master) on a MK60DN512VLL10  (100 Pin version).

A EEPROM
24LC16BT-I is correct connected to PortB2/B3.

All MQX
Settings/Files are default for TWRK60D100m.

In SW I
changed:

/*

PORTB_PCR2=PORT_PCR_MUX(2)|PORT_PCR_ODE_MASK;    // I2C0_SCL

PORTB_PCR3=PORT_PCR_MUX(2)|PORT_PCR_ODE_MASK;    // I2C0_SDA  

SIM_BASE_PTR->SCGC4
|= SIM_SCGC4_I2C0_MASK;

*/         
        

  

PORTB_PCR0=PORT_PCR_MUX(0);    // I2C0_SCL

PORTB_PCR1=PORT_PCR_MUX(0);    // I2C0_SDA  

 

PORTB_PCR2=PORT_PCR_MUX(2);    // I2C0_SCL

PORTB_PCR3=PORT_PCR_MUX(2);    // I2C0_SDA  

 

Nothing
happen on port pins and it never leave :

_ki2c_polled_rx_tx()

do

{

    i2csr = i2c_ptr->S;

    if (0 == (i2c_ptr->C1 &
I2C_C1_MST_MASK))

    {

       if (i == length)

       {

               return i;

       }

       if ((io_info_ptr->OPERATION &
I2C_OPERATION_STARTED) && (0 == (i2csr & I2C_S_BUSY_MASK)))

       {

          io_info_ptr->OPERATION = 0;

          io_info_ptr->RX_REQUEST = 0;

          io_info_ptr->STATE = I2C_STATE_FINISHED;

          return i;

       }

    }

} while (0 == (i2csr
& I2C_S_IICIF_MASK));

 

 

What I have
to change in SW?

 

BR Uwe

Outcomes