cancel
Showing results for 
Search instead for 
Did you mean: 

Data transfer between CAN bus and DMA on Hal stm32F4

SGUIG.1
Associate II

hello everyone, i would like to know how can i transfer data from CAN Bus to DMA memory on stm32f4 board on HAL Library?  also i want to make sure that the CAN access memory is it DMA or somethign else?

can you please explain to me how? or if you have an example or anything that can help me

Thanks in advance and i would really like if one of you can reply because it is urgent.

4 REPLIES 4
Jack Peacock_2
Senior III

CAN message are too short to efficiently use DMA due to setup overhead, so DMA transfers are not supported.

Jack Peacock

So how can i actually stock the Data received via CAN? That’s what i am looking for. And thank you for answering

When a completed message arrives in one of the RX FIFOs an interrupt is triggered to notify the application that data is available. There is an IRQ vector for each RX FIFO. The message is read from the RX FIFO that generated the IRQ.

The STM32 reference manual CAN section describes how this works. You need to pay close attention to the filter setup to make sure the message is directed to a FIFO, otherwise the incoming data is ignored (i.e. node does not want to receive message).

Sorry, I don't use HAL or LL, no idea if CAN is handled by that framework.

Jack Peacock

The payload is 8 bytes at a time, easier to manage the CAN TX slots in the IRQ Handler from lists you maintain in your software.​

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