This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

I2C drivers for Cortex-M3 (MCU selection) ?

Hello.

I'm in the process of selecting a new processor for a project solving a simpe task (assumably).
The main task for the MCU to be solved is simply:

1) It receives some data (it requests information, in I2C MASTER mode) from a peripheral device over I2C.
2) It converts that info to another datalayer-protocol, and sends it to another (requesting) MCU (now, I guess we must be in I2C SLAVE mode on another I2C port...).

We are currently using Keil uV4 IDE and do not want to switch IDE.

I will very much apreciate your answers to (some of) the following questions:
Q-1: Can you recomment Cortex-M3 to this application (we prefer M3 over M0+) ?
Q-2: Will it be problems (software-wise) using Cortex-M3 with two I2C ports/busses for solving this task?
Q-3: I assume the one I2C must run in SLAVE mode, and the other I2C must run in MASTER mode ?

I couldn't find any C-code I2C drivers for Cortex-M5 "out there".
Q-4: Does anybody know if there are (C-code) drivers or sample-code for I2C drivers for Cortex-M3 available (freeware or "paywere") ?

I'll appreciate assistance with these issues.

Best regards
Terje Bøhler

Parents
  • That would depend entirely upon the things which connect to those I2Cs. Again, you've no information - so it's impossible to say!

    You need to look at the specifications of the devices - that will tell you whether they are slaves or masters...

Reply
  • That would depend entirely upon the things which connect to those I2Cs. Again, you've no information - so it's impossible to say!

    You need to look at the specifications of the devices - that will tell you whether they are slaves or masters...

Children
  • Thank you Per and Andy.

    I really appreciate your comments. I'm not familiar with the I2C bus structure and we're in a process establishing both new uP, IDE etc (the entire ecosystem required for the development). First of all, I think the most important question I have to solve must be: Maybe a MULTIMASTER bus architecture is the best choice for my MCU/PCB (and, not what I originally thought, due to lack of knowledge - see my original post). My MCU is simply to:
    1) Receive some data (on our request) from a SLAVE device (on the same PCB) over I2C (we are MASTER).
    2) Send that data (modified) to another requesting MCU (external PCB) over I2C (we are SLAVE).

    I just read the book "Mastering the I2C Bus" by Vincent Himpe, and it seems that my MCU probably should implement the I2C using one common I2C MULTIMASTER bus architecture:
    1) The "SLAVE device" (acc to it's spec) is obvious in SLAVE mode.
    2) Our MCU acts as a MASTER when requesting that (above) "SLAVE device" for data.
    3) An external MCU is MASTER, requesting our MCU for data (we then act in SLAVE mode)

    Q: What will be the best bus-structure for this application:
    a) one common I2C multimaster architecture or
    b) two separate I2C buses:
    - - one separate I2C bus from our MCU to the SLAVE device (on the same PCB) and
    - - another separate I2C from our MCU to the MASTER device (external PCB) ?

    I appreciate your comments on this matter.

    Best regards
    Terje Bøhler

  • I'm not familiar with the I2C bus structure

    easily fixed

    I2C Specification: www.nxp.com/.../UM10204.pdf