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,135件の閲覧回数
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,133件の閲覧回数
andylong_2024
Contributor II

looking for I2C driver code of MCF54415

0 件の賞賛
返信

1,097件の閲覧回数
andylong_2024
Contributor II

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

0 件の賞賛
返信

1,108件の閲覧回数
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,115件の閲覧回数
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,094件の閲覧回数
andylong_2024
Contributor II

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

0 件の賞賛
返信

1,089件の閲覧回数
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,072件の閲覧回数
andylong_2024
Contributor II

Hi Tom,

thanks very much, 

I will try to get the sources you mentioned, 

0 件の賞賛
返信