Replies: 1 comment
-
After some investigations, we found that the delay are likely to be caused by the SPI communication (20 MHz) between the MCU and the CAN controller. We currently have no idea why, but any byte sent via SPI seems to have a delay (which corresponds to about the time it takes to send a byte, so it’s about two times slower because of that). We are exploring enabling DMA on the SPI1 of the STM32G474 but with no luck currently. We are also looking in enabling the embedded fdcan1 controller with the MCP set as a transceiver only, without any luck (the STM32 FDCAN drivers seems to enforce the usage of MCAN, not sure what is going on here…). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Using an MCP2518FD controller + transceiver on an STM32G474 board, I’m trying to send CAN-FD frames as fast as possible. The frames themselves look good, use the proper bitrates and I can properly receive them (using a SeeedStudio shield with a Raspberry Pi 5 as host).
The issue is that I’m having a delay between frames, and I have no idea where this is coming from. I don’t have it when sending from my Raspberry Pi for example (using
cangen
fromcan-utils
).Here’s my DTS:
Here’s my prj.conf:
Here’s my source:
Here’s my log:
Here’s my frame (getting a delay of ~490 µs between frames):

If I change my source to add a callback on send error/success:
I get the same logs but here’s my frame (getting a delay of ~180 µs, then ~490 µs, and so on):

Does anyone please have any idea on what could be adding this weird delay? I need to send my frames as fast as possible for my application. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions