Skip to main content
Visitor II
February 22, 2024
Question

Bare Metal FDCAN on STM32G491

  • February 22, 2024
  • 1 reply
  • 1494 views

Hello,

I am trying to implement the FDCAN in classic mode on the STM32G491 without the HAL. But I am havin trouble understanding how to configure and then use the CAN SRAM. I am not using the HAL nor CMSIS nor anyting else. Just the basic register definitions in a single h file. The bxCAN was way more simple and works great on a F103 (also bare metal). But the FDCAN on the G491 is somwhat more complex.

I have setup a sample in STMCubeIDE and tryed to extract the information from there. But I just dont get how the configuration of the CAN SRAM section works and how I can then send or receive any messages through this SRAM. 

Does anyone have a working example of this in bare metal C? 

    This topic has been closed for replies.

    1 reply

    Graduate
    June 16, 2024

    Hey.
    Did you ever end up finding an example implementation for the FDCan on bare metal?

    Visitor II
    June 16, 2024

    Hi,

    no but I implemented it on my own. All works now. Once I understood how the FDCAN ram worked it was pretty simple. You can set up the ram with a struct just like all the other registers and treat it as registers. That way it becomes very simple to understand and use.