STM32F4 Discovery board - Keil 5 IDE with CubeMX: Tutorial 33 - CAN Bus

preview_player
Показать описание
This tutorial shows how to communicate between two STM32 boards over CAN bus.

Here is a link to tutorial attachments:

STM32 CAN bus Filters configuration forum link:
Рекомендации по теме
Комментарии
Автор

Thanks for the video.

here are some bookmarks:
4:03 changing the default CAN pins
6:18 changing the Cube_FW_F4...
7:47 static CanRxMsgTypeDef myRxMessage;
9:50 the inside of : CanTxMsgTypeDef
14:28 call CAN_filterConfig() in start of the main
16:22 Start listening for CAN traffic with IT
28:45 filterConfig.FilterIdHigh = 0x124 << 5;
29:38 FilterMaskIdHigh = ...
30:29 //if(Mask & 0x124 == 0x124) --> Alow

yosefgreen
Автор

Nice Job sir. I have used STCubeMX before and its cross compiler IDE from ST before. I've seen issues with the derived clocks for USB, for instance, where it fails to write the correct config out, but it is mostly pretty nice. I haven't used the KEIL IDE, but the generated source from the CUBE tool is very familiar. And your presentation is nice in that you don't just sit there rambling on. You keep it abbreviated and informative. If we need to hear it again, we just hit pause and rollback. Thanks for your time sharing this implementation.

cfenerd
Автор

Thank you so much for your clear and detailed explanation video💯

Nandhakumar-rfjx
Автор

Nice tutorial! Can you please continue with a tutorial about dual can bus implementation on stm32 microcontrollers?

invendr
Автор

This looks great I might need to watch it a few times

dgb
Автор

Hi the driver for the F1 and F4 are very much changed now. They are better. When you create a can bus problem with your version by disconnect or short circuit the high and low lines sometimes the incoming irq will stop or no more messages are send. You need to re enable them in the error irq.
The data is no longer pointed in the hcan1 It is a separate parameter just like other hal funcions have.

MarkLiter
Автор

thank u, any alternative for transciever model?

edinetgrunhed
Автор

Thanks for the video, was helpful in many aspects. Can I ask how one would decide on the IDs if there were three nodes instead of two? You said for this application, the IDs are switched but I don't quite get how I can implement this for a multi-node system

pccasio
Автор

what baud rate is the can on and how do you set that?

phoenixs
Автор

Has there been update to HAL library? Whenever I try to build the project it gives me this error: "../Core/Src/main.c:54:8: error: unknown type name 'CanTxMsgTypeDef' " - I have followed all the steps you outlined.

MclarenFrocket
Автор

I tried following this in Oct 2021. It seems that STM32CubeIDE no longer uses the typedefs and variables that you show.

undercrackers
Автор

This HAL library is outdated, data structures and mechanisms of sending data, reception and callbacks has changed.
Many times I use your videos as a reference, much appreciation for your videos, basic but solid, and reliable content, except this single video :(
Would you mind creating a new version of this example using latest HAL?

maciej_sliv
Автор

Can u please make video on lora communication using stm32f discovery board

biswajit
Автор

Hi

I am trying to implement can in stm32f103, try to communicate 2 stm32f1 in normal mode so i want to ask does we need a tranceiver to for canh and canl .secondly i have a can analzyer so where i should wired it up to see data is it on canh and canl

anshbhatnagar
Автор

Can you please make video on how to communicate two STM32 boards using USART?

hamzaansari
Автор

I am trying to use the stm32l4 mcu and i am having a nube problem there is no CanTxMsg typedef in the stm32l4xx_hal_can libaray any advise

yosefelsheibani
Автор

Hello, Mutex!!!Please, give me a hint. I want to transmit message via CAN2, the same message perfectly is transmitted via CAN1, but when I add CAN2 to transmit the similar message, it is not transmitted. I use STM32F407 Discovery board.

elmirakassymova
Автор

In general how do you calculate/calibrate the Time Quanta segment 1, 2? Similarly, how do you know what value to use for banknumber?
If you have multiple devices on the bus, any device can transmit (and/or acknowledge a received message) at any time? The chip takes care of making sure there is no contention when it transmits?

Regarding the stability of the can firmware version 1.18.. do you think that applies to all stm32 devices, or just the f4?

Is it possible to do use a DMA to automatically transfer received CAN messages to RAM and/or FLASH, without cpu intervention? Or conversely, for the DMA to automatically transfer from an A/D directly to a CAN bus message?

BTW, looking at the mutex-embedded and GitHub (MostafaOkasha moggiozzi).. do you have any plans for more video tutorials (1-22)?

bennguyen
Автор

Great work thank you so so much just make a video telling how does hc-06 ble works with stm32

kamelfardi
Автор

Many thanks @MYaqoob
Before watching this awesome video, you need to read the following link guys :
Good luck :D

abdulkadirmuhendis