Hi,
I am looking for the sample code used with MCF54415 I2C communication ,
could you help me,
thanks
Hi TomE, thanks very much, and we are using MQX, is it could be used in MQX
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
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:
Regards
hi, thanks very much, we are using MQX , could it suitable for MQX,?
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
Hi Tom,
thanks very much,
I will try to get the sources you mentioned,