MQX and TWR-K60N512 I2C Help

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MQX and TWR-K60N512 I2C Help

跳至解决方案
1,203 次查看
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 项奖励
回复
1 解答
751 次查看
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 项奖励
回复
1 回复
752 次查看
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 项奖励
回复