MQX and TWR-K60N512 I2C Help

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

MQX and TWR-K60N512 I2C Help

Jump to solution
784 Views
admin
Specialist II

Hello,

 

I'm attempting to get the polled I2C to work using MQX on the K60 tower.  I've gone through the i2c demo and I can see that it appears to be working from the generated output, however I see nothing on the I2C lines.

 

I'm now attempting to use the tower to talk to another I2C device however it is not working, and after connecting an Oscilloscope to what I believe are the I2C SDA and I2C SCL I'm not seeing any activity. 

 

I'm not sure if I need to change something in the demo to make it output through the tower or if something else may be wrong.  I've connected the probes (using Jumpers) to:

 

SCL: TWRPI I2C SCL (J5 Pin 3)

SDA: TWRPI I2C SDA (J5 Pin 4)

GND: TWRPI J5 Pin 2 GND

 

Both SCL and SDA pins read at a constant 3.2V. 

 

For MQX I haven't made many or any changes to the actual i2c demo but I have gone into the user config and set:

#define BSPCFG_ENABLE_I2C1       1 (was previously 0)
#define BSPCFG_ENABLE_II2C1      1 (was previously 0)

 

And then re-compiled the MQX kernel. 

 

Any help moving this along so that I can start actually working with the communications between the two devices instead of just turning them on would be greatly appreciated.

 

Attached is a txt file log of the i2c demo output.

 

Thanks,

 

Nicholas Alunni

0 Kudos
1 Solution
332 Views
PetrM
Senior Contributor I

Hello,

 

you should enable I2C0 in the user_config.h. This HW module is used on K60 in MQX example.

PTD8 and PTD9 pins are set to I2C SCL and SDA functionality.

 

Regards,

PetrM

 

View solution in original post

0 Kudos
1 Reply
333 Views
PetrM
Senior Contributor I

Hello,

 

you should enable I2C0 in the user_config.h. This HW module is used on K60 in MQX example.

PTD8 and PTD9 pins are set to I2C SCL and SDA functionality.

 

Regards,

PetrM

 

0 Kudos