cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to use the CAN bus protocol on an STM32 without using a module?

matehyliffe
Associate II

"Hi, I'm working on an EV project. We're attempting to implement the CAN bus protocol on STM32. I'm wondering if there's a way to communicate between two STM32s using the CAN bus without using a module?"

1 ACCEPTED SOLUTION

Accepted Solutions
AScha.3
Chief III

Hi,

what is the "module" here ?

If you mean a driver chip : yes, you need one on every cpu-> CAN bus; transforms rx/tx from cpu to CANH/CANL symmetrical/complement signal line..

Something like this :

AScha3_0-1709384287620.png

MCP2562  doing 3,3v cpu -> 5V standard CAN bus voltage level; and termination 120r on every end of line.

is about $ 1,50  on every cpu , and you work with real conditions, can connect to other CAN bus devices also.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

6 REPLIES 6
AScha.3
Chief III

Hi,

what is the "module" here ?

If you mean a driver chip : yes, you need one on every cpu-> CAN bus; transforms rx/tx from cpu to CANH/CANL symmetrical/complement signal line..

Something like this :

AScha3_0-1709384287620.png

MCP2562  doing 3,3v cpu -> 5V standard CAN bus voltage level; and termination 120r on every end of line.

is about $ 1,50  on every cpu , and you work with real conditions, can connect to other CAN bus devices also.

If you feel a post has answered your question, please click "Accept as Solution".

The term 'module' referred to the transceiver, but as far as I understand, I need to purchase it to work on STM32. Thank you.

You need something to merge the signals. There's a low cost method with diodes and a resistor you can use to experiment at a board level.

https://www.keil.com/appnotes/files/apnt_236.pdf

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

I was planning to buy MCP2551, but since it's not sold in my country, I will buy the SN65HVD230 module. Is it compatible with STM32F407?

I expect so, it's been used on several of the STM32 EVAL boards

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

I will buy the SN65HVD230 module. Is it compatible with STM32F407?

Yes indeed you can use this transceiver. It's already used in some STM32 Eval boards.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.