cancel
Showing results for 
Search instead for 
Did you mean: 

How to handle high-volume FDCAN data without DMA?

Karthick008
Associate II

Split from How to make the FDCAN with DMA - which is solved.
TL;DR: STM32s don't support DMA for CAN or FDCAN.


Hi, thanks for the clarity.

But, the doubt I'm having was, then how to handle that much data rate like eg.5mbps in FDCAN without any help of DMA?

In my case, the CPU will be busy with doing other high priority works, so how can I handle the CAN data without the intervention of CPU.

Kindly, suggest a way to resolve this. Thanks

5 REPLIES 5
mƎALLEm
ST Employee

Hello,

Did you face an issue for a such scenario or that was just a question?

And for your question:


@Karthick008 wrote:

 so how can I handle the CAN data without the intervention of CPU.

 

No other method. Only CPU can handle the CAN data. And as far as I know we didn't receive any complaint about CPU load issue regarding this point from our customers..

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.
Ozone
Principal

I don't know STM32G4 details, and I haven't worked with anything beyond standard CAN yet.
The latter because the physical dimensions of the network and other constraints don't allow bitrates higher than 250kBit for our applications.

Nonetheless, all CAN implementations on STM32s I know support Tx mailboxes and Rx FIFOs. Use the latter to reduce CPU load, and unload the FIFO only on certain filling level, if your application allows for that.

Our applications operate cycle-based, only in very rare instances a message response is sent immediately.

Yes, thanks. Our need is that we're planning for Power Converter paralleling. In this we need some way of communication to handle the high payload between the converters. We thought of using FDCAN for this purpose, since it has high data rate of up-to 5mbps. But, after going through your feedback it looks like not a good option to use FDCAN for high speed transactions. So, can you suggest a good approach to resolve this issue or share any resources related to enabling high reliable communication in STM32 for parallel operations of systems. Thanks.

> We thought of using FDCAN for this purpose, since it has high data rate of up-to 5mbps.

I would suggest to check out the CiA webpage in this regard. The can probably cite some example use cases.
My company produces larger machinery, working almost exclusivley outdoors. Quite a different application than yours.

> Our need is that we're planning for Power Converter paralleling. In this we need some way of communication to handle the high payload between the converters.

I don't know specific requirements, such as peak + sustained data rates, and realtime requirements.
On the higher end, there are realtime ethernet protocols like Profinet, EtherCAT or SERCOS.
And on the lower end, UART based protocols using RS422/RS485 like Modbus, P-Net or Profibus.
Maybe such an interface would suit your application better.


CAN was developed by Bosch, which is a main supplier for the automotive industry. And from inception, this protocol was taylored towards the automotive use cases.

Oleksii
Associate III

What prevents you from starting DMA in the interrupt from FIFo to copy from RAM (FIFO memory) to a regular RAM ring buffer, this is a couple of lines of code on CMSIS.