cancel
Showing results for 
Search instead for 
Did you mean: 

Is STM32F103C6 can bus terminated?

DHans.2
Associate

I have two blackpill boards with STM32F103C6 MCU's on them, I want to explore using can bus between those two units and am wondering if I need to add termination to the cables or if those pins are internally terminated when configured for CAN.

All the tutorials I have found doing CAN on stm32 just use usart to communicate with a CAN transreceiver IC, but to clarify, I want to use the integrated CAN functionality on pins PB9 and PB8.

Thanks!

3 REPLIES 3
Ozone
Lead

> ... and am wondering if I need to add termination to the cables or if those pins are internally terminated when configured for CAN.

The CAN peripheral contains definitely no termination. This needs to be added AFTER the transceiver (i.e. in the transceiver<-->transceiver cabling) not at logic level.

The CAN peripheral contains no transceiver either - you have to add it externally. Not sure if the blackpill boards have them.

To get started, you could connect two CAN devices (like separate STM32 boards) on logic level directly (crossing Rx and Tx), without transceiver and termination. If you keep the cabling short.

Thank you for the answer, I do have two boards and short jumper cables I can use to connect them.

I might have misunderstood something though. I thought the STM32 had an internal transreceiver connected to CAN_rx(PB8) and CAN_tx(PB9) pin, otherwise why are they specially marked like that?

If I'm going to use an external transreceiver I could just connect it to any USART pin, right?

andy2399
Senior

No, the STM32 part does not have an internal transceiver.

Typically you would want to do:

0690X00000AR8tPQAT.png

The jumper JP allows you to connect the termination resistor or not. If you have multiple devices connected to the CAN bus you would typically fit the jumper on the boards at each end of the bus but,

The transceiver only drives the signal levels on the bus it does not do the CAN protocol so no, you cannot connect the transceiver to a UART.

HTH

Andy