Skip to main content
SGUIG.1
Associate II
June 3, 2020
Question

Data transfer between CAN bus and DMA on Hal stm32F4

  • June 3, 2020
  • 4 replies
  • 3024 views

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.

This topic has been closed for replies.

4 replies

Jack Peacock_2
Associate II
June 3, 2020

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

Jack Peacock

SGUIG.1
SGUIG.1Author
Associate II
June 3, 2020

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

Jack Peacock_2
Associate II
June 3, 2020

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