3
\$\begingroup\$

I am designing a PCB based on STM32F446 and I want to include CAN BUS communication. I know I need a transceiver (from CAN_H and CAN_L to TX and RX) and a CAN Controller. I have thought about MCP2551 (transceiver) and MCP2515 (controller; from TX_CAN and RX_CAN to SPI). The thing is that I am a bit loss about if this components are a good choice, or not, as I am a bit loss about if this are TTL or CMOS and which technology should I use with STM32F4.

\$\endgroup\$
1
  • \$\begingroup\$ As long as the voltage and current levels match the technology is irrelevant. \$\endgroup\$
    – Finbarr
    Commented Oct 24, 2022 at 9:56

3 Answers 3

3
\$\begingroup\$

You don't need a CAN controller. The STM32F446 already features two integrated CAN controllers (bxCAN1, bxCAN2). You only need a CAN controller when the MCU doesn't have an integrated CAN controller, or it doesn't support the features you need (CAN FD for example).

The MCP2551 transceiver is a bit dated, but it would work:

  • The CAN RX/TX pins of the STM32F446 are 5V tolerant
  • The MCP2551 TXD input is 3.3V compatible

STM32F446 datasheet:

enter image description here

enter image description here

MCP2551 datasheet:

enter image description here

\$\endgroup\$
5
  • \$\begingroup\$ "The MCP2551 TXD input is 3.3V compatible" Yes but it must be supplied with 4.5V to 5.5V so unless you have a 5V supply on the board for other reasons, it's a very bad choice of transceiver. \$\endgroup\$
    – Lundin
    Commented Oct 26, 2022 at 9:09
  • \$\begingroup\$ @Lundin Yes, I agree. Also for other reasons I probably would never choose a MCP2551. But OP asked for this specific chip. So they must have their reasons. \$\endgroup\$
    – Velvet
    Commented Oct 26, 2022 at 9:35
  • \$\begingroup\$ @VelVel Thanks for your reply. Which is the meaning of "FT"? As well as Ftf or TTa, which is the meaning of I/O Structure? \$\endgroup\$ Commented Oct 28, 2022 at 11:56
  • \$\begingroup\$ @DevelopingElectronics FT, FTf, TTa, B and RST are just codes for the different "I/O structure" classes. They are simply abbreviations for the I/O class they represent: e.g. FT = Five volt Tolerant. This makes it easier to specify the I/O stucture within the Pin table. \$\endgroup\$
    – Velvet
    Commented Oct 28, 2022 at 12:06
  • \$\begingroup\$ @DevelopingElectronics See page 11 of this STM32 GPIO presentation. \$\endgroup\$
    – Velvet
    Commented Oct 28, 2022 at 12:17
3
\$\begingroup\$

Nobody uses external CAN controllers since some 20+ years back unless you have very specific reasons not to pick a MCU with an internal controller. You did pick such a MCU, so using MCP2515 is senseless.

Also when specifying any part in general, we start by checking the part status. https://www.microchip.com/en-us/product/MCP2551. It says "not recommended for new designs", since this is an older generation of transceivers.

2 generations later, we end up with Microchip's recommended parts, which would be MCP2561FD or MCP2562FD. These are mostly compatible with the old MCP2551 but far more rugged. The 2561 supports a "split" function on pin 5 for higher baudrates (CANFD) whereas the 2562 replaces this pin 5 with a Vio for supplying the logic levels separately (3V3 logic).

Additionally the STM32F got 3 to 5V tolerance.

So from here on you need to figure out if you wish to use 3.3V or 5V supply. There's other transceivers that can be used for 3.3V supply if you wish to keep everything purely at 3.3V level. I don't really recommend that unless your BOM is tight though.

\$\endgroup\$
4
  • \$\begingroup\$ "There's other transceivers that can be used for 3.3V supply if you wish to keep everything purely at 3.3V level. I don't really recommend that unless your BOM is tight though." I never used these single supply 3.3V transceivers, but just checked them out. For instance the TCAN330. What is the reason that you wouldn't recommend these types? \$\endgroup\$
    – Velvet
    Commented Oct 26, 2022 at 9:49
  • \$\begingroup\$ @Seir My only practical experience comes from using SN65HVD232 and it generates much dirtier CAN signals than the 5V MCP2xxx ones. Each time you sniff it with a scope you subjectively start to doubt if it's actually CAN compliant, it feels like a lower quality product. I have them in series production products however and there's not been any problems there. \$\endgroup\$
    – Lundin
    Commented Oct 26, 2022 at 10:50
  • 1
    \$\begingroup\$ @Lundin So, I could use MCP2561FD or MCP2562FD (power supplied with 5V) and connect it to the CAN_RX and CAN_TX pins in STM32F4 (3,3V power supply) without getting any error, right? \$\endgroup\$ Commented Nov 4, 2022 at 8:19
  • 1
    \$\begingroup\$ @DevelopingElectronics You'd have to use MCP2562FD, provide 5V to Vdd and 3.3V to Vio. \$\endgroup\$
    – Lundin
    Commented Nov 4, 2022 at 8:29
2
\$\begingroup\$

Is there a specific reason you don't want to use the two CAN controllers already in the STM32F446? Then all you need is a 3V CAN transceiver. Job done.

As for TTL or CMOS, why would that be a consideration? I'd suggest finding much in TTL these days would be difficult - especially CAN controllers as I don't think they were ever TTL, maybe NMOS then CMOS.

\$\endgroup\$

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