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

CAN bus, SPI or I2C

I am currently about to undertake a project using the C167 infineon. I will be communicating with another processor and a number of FPGA aand need to choose between CAN bus, SPI or I2C. I have a very short time scale to produce this project and am after advice of which would be the best route to take.

Has anyone out there any advice of the easiest route to take????????

Parents
  • For on-board communication I would recommend SPI as this is generally the easiest to implement (including on a FPGA). SPI (SSC) has the highest available baudrate of your choices (Master = 10Mbaud and Slave = 5MBaud, CPU clock = 20 MHz) it is also capable of full duplex if using a three wire interface (CLK, D0, and DI). The transmit and receive registers are double buffered and support a data width from 2 to 16-bits.

    Also to be clear the C167 has no concept of a Chip Select and this must be implemented using a GPIO (Software implications).

    The C167 does not have I2C so you would have to bit-bang it in software.

    If you are making a commercial application, you must make a licensing deal with Bosch if you implement on the FPGA.

    You could also use the UART (ASC) in open drain mode.

    Off-board, given your choices I would choose CAN along with a transceiver.

Reply
  • For on-board communication I would recommend SPI as this is generally the easiest to implement (including on a FPGA). SPI (SSC) has the highest available baudrate of your choices (Master = 10Mbaud and Slave = 5MBaud, CPU clock = 20 MHz) it is also capable of full duplex if using a three wire interface (CLK, D0, and DI). The transmit and receive registers are double buffered and support a data width from 2 to 16-bits.

    Also to be clear the C167 has no concept of a Chip Select and this must be implemented using a GPIO (Software implications).

    The C167 does not have I2C so you would have to bit-bang it in software.

    If you are making a commercial application, you must make a licensing deal with Bosch if you implement on the FPGA.

    You could also use the UART (ASC) in open drain mode.

    Off-board, given your choices I would choose CAN along with a transceiver.

Children