cancel
Showing results for 
Search instead for 
Did you mean: 

Bare Metal FDCAN on STM32G491

Nickelgrass
Senior

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? 

2 REPLIES 2
JRAxelrad
Associate II

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

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.