Not able to transmit and receive CAN frames using CANFD classic mode on STM32G474RET6
Hi,
I am using STM32G474RET6 controller and would like to send and receive data in classic mode. I have configured all necessary parameters using cubemx but the hard fault occured when I call this function HAL_FDCAN_AddMessageToTxFifoQ(&hfdcan1, &TxHeader, TxData).
The CAN termination is connected properly.
Following are my configuration settings:



i also init the CAN filter before transmit can message using the function below:

the can message transmitting function is as below:

when the code run till FDCAN_CopyMessageToRAM, it will go into HardFault_Handler, that's really confused me.
disable the code that related to can function in main.c file, it could run normally.
