I am looking for the sample code used with MCF54415 I2C communication ,could you help me?

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

I am looking for the sample code used with MCF54415 I2C communication ,could you help me?

1,134 次查看
andylong_2024
Contributor II

Hi,

 

I am looking for the sample code used with MCF54415 I2C communication ,

could you help me, 

thanks

0 项奖励
回复
7 回复数

1,132 次查看
andylong_2024
Contributor II

looking for I2C driver code of MCF54415

0 项奖励
回复

1,096 次查看
andylong_2024
Contributor II

Hi TomE, thanks very much, and we are using MQX, is it could be used in MQX

0 项奖励
回复

1,107 次查看
TomE
Specialist II

The MCF54418 can run Linux. That means Linux (or the version that NXP released for that chip) had support for the peripherals (including I2C) and contains the driver source. Note that often the version of Linux released for these chips is a "highly patched" version and not the mainline one.

Anyway, this says that in the current Linux distribution, Coldfire chips are supported by the "I2C-IMX" driver:

https://elixir.bootlin.com/linux/v6.10.3/source/drivers/i2c/busses/Kconfig

Which is:

https://elixir.bootlin.com/linux/v6.10.3/source/drivers/i2c/busses/Kconfig

Which is probably way too complicated for what you're looking for.

Googling "coldfire i2c source" finds lots of examples.

Tom

 

0 项奖励
回复

1,114 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

On reference manual you can find how the I2C works and its implementation please check it:

https://www.nxp.com/docs/en/reference-manual/MCF54418RM.pdf

For sample code you can find the codewarrior that has a code for I2C but this in the Tower please check it:

https://www.nxp.com/design/design-center/software/development-software/codewarrior-development-tools...

 

Regards

0 项奖励
回复

1,093 次查看
andylong_2024
Contributor II

hi, thanks very much, we are using MQX , could it suitable for MQX,?

0 项奖励
回复

1,088 次查看
TomE
Specialist II

I'd be surprised if MQX doesn't already support I2C. Have you looked in the BSP and in all the sources that you have there? What version of MQX do you have?

MQX is currently at Rev 5, and support for Coldfire is missing. I'm guessing it was supported in the previous version, but they say "MQX v4.2 is no longer available".

What I said about Linux is that I2C support isn't specific to one CPU, but the driver is for Freescale. That means for their Coldfire parts and the i.MX parts. Freescale have been using the same I2C hardware module in a lot of different parts over a long time. I've just checked the MCF54415, MCF5235 and i.MX6DQ manuals, and they all have the same I2C control registers. So a driver for any one of them should work on the others with a bit of tweaking for addresses and interrupts and so on.

I think you should already have an I2C driver for MQX there. If not, you might be able to get MQX 5, and might be able to use an i.MX I2C driver from that (if they haven't changed the OS too much).

I can't give you anything that will "drop in and work". Whatever you do will need some work.

Tom

 

0 项奖励
回复

1,071 次查看
andylong_2024
Contributor II

Hi Tom,

thanks very much, 

I will try to get the sources you mentioned, 

0 项奖励
回复