Skip to main content
SRath.4
Associate II
April 18, 2023
Question

CAN communication setup with stm32f407vet6

  • April 18, 2023
  • 7 replies
  • 2917 views

I have stm32f407vet6 board as well as another end for CAN is made using stm32f103c8t6, So can you help me setup CAN communication between these. where in stm32f103c8t6 will have usb end which will be connected to laptop.

This topic has been closed for replies.

7 replies

mƎALLEm
ST Technical Moderator
April 18, 2023

Hello,

With  stm32f103 you can't use USB and CAN at the same time as they share the same memory.

Please refer to RM0008 Rev 21 / section 23.2 USB main features

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
SRath.4
SRath.4Author
Associate II
April 18, 2023

Hello,

Let me make the question clearer, I have a CAN analyzer with which I want to setup CAN communication for stm32f407vet6. 

mƎALLEm
ST Technical Moderator
April 18, 2023

To use CAN you have to setup the HW:

  • Add a transceiver (SN65HVD230 as an example).
  • Add a termination resistor of 120ohm

From STM3240G-EVAL schematic:


_legacyfs_online_stmicro_images_0693W00000biIawQAE.png For the CAN software you can refer to the example provided by STM32CubeF4 package under the path Projects\STM324xG_EVAL\Examples\CAN\CAN_Networking.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
SRath.4
SRath.4Author
Associate II
April 18, 2023

Can you provide me something from scratch, like pins and code protocols, demo project or anything with detail about everything.

mƎALLEm
ST Technical Moderator
April 18, 2023

I've already provided the details: HW setup and a project example using CAN networking.

Use STM3240G-EVAL as reference.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
SRath.4
SRath.4Author
Associate II
April 18, 2023

my board is STM32F407VET6

mƎALLEm
ST Technical Moderator
April 18, 2023

STM3240G-EVAL board features a STM32F407IGH6 which is the same die. You can use it as a reference. Refer to the schematics in the Appendix A section "Schematics".

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