2024-03-02 4:38 AM
"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?"
Solved! Go to Solution.
2024-03-02 5:02 AM - edited 2024-03-02 5:05 AM
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 :
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.
2024-03-02 5:02 AM - edited 2024-03-02 5:05 AM
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 :
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.
2024-03-02 5:39 AM
The term 'module' referred to the transceiver, but as far as I understand, I need to purchase it to work on STM32. Thank you.
2024-03-02 6:15 AM
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
2024-03-02 6:33 AM
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?
2024-03-02 7:33 AM
I expect so, it's been used on several of the STM32 EVAL boards
2024-03-03 11:34 PM
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.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.