cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F407VG to PC Communication via CAN – USB-to-CAN Adapter Recommendation

Loganathan
Visitor

Hello,

I’m working with the STM32F407VG microcontroller and I want to establish communication between the PC and the board using CAN protocol. My goal is to transmit and receive user data via CAN between the STM32 and a PC application. Which USB-to-CAN adapter is recommended for CAN communication with Board.

[STM32 Board] --- [USB-to-CAN Adapter] --- [PC]

3 REPLIES 3
mƎALLEm
ST Employee

Hello @Loganathan and welcome to the ST community,

So where is the question? and which board are you using for STM32F407VG microcontroller?

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.

Hi,

How to establish CAN communication between STM32F407VG and PC via USB-to-CAN adapter? Which USB-to-CAN adapter do you recommend for stable and compatible CAN communication between the STM32F407VG board and a Windows PC?

First of all you need to establish a complete CAN bus with at least two CAN nodes. Then, in your case, the first node contains STM32F407 MCU with a CAN transceiver + a terminating resistor of 120 ohm and the second node a CAN/USB adapter on which you need to enable an internal 120ohm terminating resistor.

This is a minimal CAN bus structure:

https://community.st.com/t5/stm32-mcus/stm32-fdcan-running-at-8-mb-s-on-nucleo-boards/ta-p/730281?lightbox-message-images-730281=90488iD4EA082CEF3B11D9

I cannot give a recommendation for an USB-to-CAN adapter. But I can give an example: https://www.waveshare.com/usb-can-a.htm

But this is not a recommendation it's up to you to decide as this is not an ST product.

Meanwhile, from the microcontroller side, you need to add a transceiver for example what was used on several ST boards: SN65HVD230.

CAN communication example is provided here.

If you are not familiar with the CAN bus you need to study it before going ahead with using as communication medium.

Hope that helps.

 

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.