4
\$\begingroup\$

I want to use a small 8 bit microcontroller which has only a single CAN rx/tx, i.e. Atmel 32c1, but in my application I need to be able to send and receive requests from two CAN buses.

I have read the datasheet for a particular transceiver, AMIS−42700 (http://www.onsemi.com/pub/Collateral/AMIS-42700-D.PDF), but I don't understand whether this physically joins the two buses or allows a microcontroller to receive and send on the two buses, like a mux.

I absolutely don't want the two buses joined for any other devices.

Is this possible by either using a transceiver or multiplexer? I feel the ideal solution would look something like a device which intelligently joins the two buses coming into the microcontroller and has a (perhaps gpio driven) mux on TX which I can change between writing messages to the two different buses to select a bus for writing.

\$\endgroup\$
5
\$\begingroup\$

In principle you should be able to multiplex MCU CAN signal lines, prior to their being used to interface to a CAN physical layer transceiver, using something like a 74HC4052.

In practice, I'd suggest that it's not a very good idea to do so. The problem is that multiplexing would mean that you are guaranteed to periodically miss transmissions from each of the buses.

If you can't tolerate regularly missing traffic on either/both buses, then you'd be better off using an external CAN peripheral; an example would be the MCP25625, which has a CAN link layer and PHY and is controlled via SPI. Adding this to your existing MCU + CAN PHY would allow you to simultaneously and separately interact with both CAN buses, with little if any risk of missing any traffic on either.

\$\endgroup\$
  • 1
    \$\begingroup\$ Just in case somebody comes across this, I found it was more space efficient and generally easier to use a 100-pin 16-bit Freescale MCU in the end. Freescale starts dual CAN support quite cheap and small. Why Atmel doesn't make any small dual CAN chips at all, honestly, I don't know. \$\endgroup\$ – kvanberendonck Jan 4 '15 at 1:59
  • 1
    \$\begingroup\$ @kvanberendonck There are some ARM Cortex-M parts with lower pin counts that have multiple CAN transceivers, e.g. the STM32F2 and STM32F4 are available in QFP64 packages. \$\endgroup\$ – markt Jan 4 '15 at 3:38
  • \$\begingroup\$ Thanks. While I can't use it on this particular application (because I'm looking for automotive grade parts) it's definitely useful to know. A friend also recommended the stm32 for one of my larger applications. Edit: WOW, 180Mhz? Seriously? \$\endgroup\$ – kvanberendonck Jan 4 '15 at 4:28
  • \$\begingroup\$ @kvanberendonck yeah, the STM32F4's are pretty impressive, and they're not even the best of the M4's; some of the NXP M4's (LPC43xx) are rated to 204MHz and have up to two M0 cores in the same package plus a heap of nifty peripherals (SPIFI, USB-HS w/PHY, SGPIO). Also, you will find automotive grade Cortex-M's if you look. \$\endgroup\$ – markt Jan 4 '15 at 4:51
1
\$\begingroup\$

Is this possible by either using a transceiver or multiplexer? I feel the ideal solution would look something like a device which intelligently joins the two buses coming into the microcontroller and has a (perhaps gpio driven) mux on TX which I can change between writing messages to the two different buses to select a bus for writing.

Well this chip is exactly what you are looking for, but with a twist. You can not transmitt or receive on both CAN buses at the same time.

Making a system that uses either one can bus or the other - easy.

Making a system that uses both of them at the same time - no go.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.